我试图集成用于本机数据传输的cn1lib,该功能可在扩展页面上找到。不幸的是,当这个库被集成时,会出现一些构建错误:一些awt类丢失了(例如import java.awt.Component;)。
我不知道,究竟缺少什么来完成构建。
下面是包含生成错误的完整控制台输出:
[echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
[echo] code size and wider device support
[copy] Copying 80 files to /Users/Klaus/Documents/workspace/GTD/build/tmp
[javac] /Users/Klaus/Documents/workspace/GTD/build.xml:147: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 73 source files to /Users/Klaus/Documents/workspace/GTD/build/tmp
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: /Users/Klaus/Documents/workspace/GTD/src/de/zeitkuenstler/gtd/data/DBXAccess.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[copy] Copying 4 files to /Users/Klaus/Documents/workspace/GTD/build/tmp
[jar] Building jar: /Users/Klaus/Documents/workspace/GTD/dist/GTD.jar
[javac] /Users/Klaus/Documents/workspace/GTD/build.xml:171: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /Users/Klaus/Documents/workspace/GTD/native/internal_tmp
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:5: error: package java.awt does not exist
[javac] import java.awt.Component;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:6: error: package java.awt does not exist
[javac] import java.awt.Container;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:7: error: package java.awt does not exist
[javac] import java.awt.EventQueue;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:8: error: package java.awt does not exist
[javac] import java.awt.Frame;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:9: error: package java.awt.datatransfer does not exist
[javac] import java.awt.datatransfer.DataFlavor;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:10: error: package java.awt.datatransfer does not exist
[javac] import java.awt.datatransfer.Transferable;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:11: error: package java.awt.datatransfer does not exist
[javac] import java.awt.datatransfer.UnsupportedFlavorException;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:12: error: package java.awt.dnd does not exist
[javac] import java.awt.dnd.DnDConstants;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:13: error: package java.awt.dnd does not exist
[javac] import java.awt.dnd.DropTargetAdapter;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:14: error: package java.awt.dnd does not exist
[javac] import java.awt.dnd.DropTargetDropEvent;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:15: error: cannot find symbol
[javac] import java.io.BufferedInputStream;
[javac] ^
[javac] symbol: class BufferedInputStream
[javac] location: package java.io
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:16: error: cannot find symbol
[javac] import java.io.File;
[javac] ^
[javac] symbol: class File
[javac] location: package java.io
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:17: error: cannot find symbol
[javac] import java.io.FileInputStream;
[javac] ^
[javac] symbol: class FileInputStream
[javac] location: package java.io
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:21: error: cannot find symbol
[javac] import java.net.URLConnection;
[javac] ^
[javac] symbol: class URLConnection
[javac] location: package java.net
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:22: error: package java.nio.file does not exist
[javac] import java.nio.file.Files;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:26: error: package javax.swing does not exist
[javac] import javax.swing.JComponent;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:27: error: package javax.swing does not exist
[javac] import javax.swing.JFrame;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:28: error: package javax.swing does not exist
[javac] import javax.swing.JPanel;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:32: error: package java.awt.dnd does not exist
[javac] java.awt.dnd.DropTarget dropTarget;
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:34: error: cannot find symbol
[javac] private Component findCanvas(Component c, Set<Component> checked) {
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:34: error: cannot find symbol
[javac] private Component findCanvas(Component c, Set<Component> checked) {
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:34: error: cannot find symbol
[javac] private Component findCanvas(Component c, Set<Component> checked) {
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:60: error: cannot find symbol
[javac] private Component findCanvas(Component c) {
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:60: error: cannot find symbol
[javac] private Component findCanvas(Component c) {
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:42: error: cannot find symbol
[javac] if (c instanceof JComponent) {
[javac] ^
[javac] symbol: class JComponent
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:45: error: cannot find symbol
[javac] JComponent jc = (JComponent)c;
[javac] ^
[javac] symbol: class JComponent
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:45: error: cannot find symbol
[javac] JComponent jc = (JComponent)c;
[javac] ^
[javac] symbol: class JComponent
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:46: error: cannot find symbol
[javac] Component[] children = jc.getComponents();
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:47: error: cannot find symbol
[javac] for (Component child : children){
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:48: error: cannot find symbol
[javac] Component found = findCanvas(child, checked);
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:61: error: cannot find symbol
[javac] return findCanvas(c, new HashSet<Component>());
[javac] ^
[javac] symbol: class Component
[javac] location: class NativeDragAndDropImpl
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:70: error: cannot find symbol
[javac] Frame[] frames = Frame.getFrames();
[javac] ^
[javac] symbol: class Frame
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:70: error: cannot find symbol
[javac] Frame[] frames = Frame.getFrames();
[javac] ^
[javac] symbol: variable Frame
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:71: error: cannot find symbol
[javac] JPanel canvas = null;
[javac] ^
[javac] symbol: class JPanel
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:72: error: cannot find symbol
[javac] for (Frame frame : frames) {
[javac] ^
[javac] symbol: class Frame
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:73: error: cannot find symbol
[javac] if (frame instanceof JFrame) {
[javac] ^
[javac] symbol: class JFrame
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:74: error: cannot find symbol
[javac] JFrame jframe = (JFrame)frame;
[javac] ^
[javac] symbol: class JFrame
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:74: error: cannot find symbol
[javac] JFrame jframe = (JFrame)frame;
[javac] ^
[javac] symbol: class JFrame
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:75: error: cannot find symbol
[javac] canvas = (JPanel)findCanvas(jframe.getContentPane());
[javac] ^
[javac] symbol: class JPanel
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:81: error: cannot find symbol
[javac] final JPanel fcanvas = canvas;
[javac] ^
[javac] symbol: class JPanel
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:82: error: package java.awt.dnd does not exist
[javac] dropTarget = new java.awt.dnd.DropTarget(canvas, new DropTargetAdapter() {
[javac] ^
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:82: error: cannot find symbol
[javac] dropTarget = new java.awt.dnd.DropTarget(canvas, new DropTargetAdapter() {
[javac] ^
[javac] symbol: class DropTargetAdapter
[javac] /Users/Klaus/Documents/workspace/GTD/lib/impl/native/javase/com/codename1/datatransfer/NativeDragAndDropImpl.java:65: error: cannot find symbol
[javac] EventQueue.invokeLater(new Runnable() {
[javac] ^
[javac] symbol: variable EventQueue
[javac] location: class NativeDragAndDropImpl
[javac] 43 errors
生成失败/Users/Klaus/Documents/workspace/GTD/BUILD。xml:171:编译失败;有关详细信息,请参阅编译器错误输出。
在当前版本的Eclipse build.xml模板中似乎有一个错误。我已经应用了一个补丁,它将包含在下一个插件更新中。同时,您需要对build.xml文件做一点小小的修改。
在您build.xml的170行周围,有一个javac调用:
<javac destdir="native/internal_tmp" compiler="modern"
source="1.8"
target="1.8"
bootclasspath="lib/CLDC11.jar"
classpath="lib/CodenameOne.jar:${build.classes.dir}:lib/impl/cls:build/tmp">
<src path="native/javase"/>
<src path="lib/impl/native/javase"/>
</javac>
删除bootclasspath=
行,因此您最终会得到:
<javac destdir="native/internal_tmp" compiler="modern"
source="1.8"
target="1.8"
classpath="lib/CodenameOne.jar:${build.classes.dir}:lib/impl/cls:build/tmp">
<src path="native/javase"/>
<src path="lib/impl/native/javase"/>
</javac>
我在native/android软件包下添加了paypal android SDK。在主项目结构(com.mycompany.myapp)中创建本机接口。在native/android下,实现的类使用paypal sdk类。我的实现类: 我从主类调用了该方法: apk构建成功,但在触发代码时出现以下错误:android.content.ActivityNot找到异常:无法找到显式活动类{com.m
Adding the capability to connect databases to Express apps is just a matter of loading an appropriate Node.js driver for the database in your app. This document briefly explains how to add and use som
我有一个集成流程,我从jms通道读取消息,并使用http-outbound-gateway通过REST api调用发送它们。现在,当我收到一个5xx Http服务器错误时,我希望记录服务的URL以及响应消息。 我看到实例已经记录了URL并调用了一个,它可以是一个自定义实现。 我的问题是:只接收作为参数,我无法知道来自该实例的URL。我需要的是记录服务器错误,例如:“错误URL-响应...” 我该怎
当我尝试通过MySQL工作台从本地服务器远程导出数据库时, 我收到一些以下版本错误: mysqldump版本不匹配[内容]mysqldump。exe的版本为5.5.16,但要转储的MySQL Server的版本为5.6.10-log。由于mysqldump的版本比服务器旧,因此可能无法正确备份某些功能。建议您将本地MySQL客户端程序(包括mysqldump)升级到等于或高于目标服务器的版本。然后
我有两个docker容器在运行,遵循这里给出的说明:https://github.com/swri-robotics/bag-database。 现在我可以在浏览器中使用:localhost:8080查看数据库,因此它设置正确,运行良好。 我是这样运行的: docker运行-d-p 5432:5432--name bagdb-postgres-v/var/lib/bagdb-postgres:/v
Flink是否支持数据集中的侧输出功能(批处理Api)?如果没有,从文件加载时如何处理有效和无效记录?