codenameone在android项目中使用javase进行扩展。构建失败

时间:2017-03-14 17:12:48

标签: codenameone

Project不会构建:错误:包java.util.logging不存在[javac] import java.util.logging.Level;

重现的步骤:( eclipse neon) 1.创建一个新的codenameone项目。 2.打开codenameone设置,下载admob扩展名 3.刷新cn1libraries。

获取以下错误。请注意,本机android没有java util。为什么使用javase?

Buildfile: /Users/sam/dev/wordtime5_ws/test2/build.xml

jar:
        [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 1 file to /Users/sam/dev/wordtime5_ws/test2/build/tmp
       [javac] /Users/sam/dev/wordtime5_ws/test2/build.xml:147: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
       [javac] Compiling 1 source file to /Users/sam/dev/wordtime5_ws/test2/build/tmp
        [copy] Copying 11 files to /Users/sam/dev/wordtime5_ws/test2/build/tmp
         [jar] Building jar: /Users/sam/dev/wordtime5_ws/test2/dist/test2.jar
       [javac] /Users/sam/dev/wordtime5_ws/test2/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/sam/dev/wordtime5_ws/test2/native/internal_tmp
       [javac] /Users/sam/dev/wordtime5_ws/test2/lib/impl/native/javase/com/codename1/admob/AdMobNativeImpl.java:16: error: package java.util.logging does not exist
       [javac] import java.util.logging.Level;
       [javac]                         ^
       [javac] /Users/sam/dev/wordtime5_ws/test2/lib/impl/native/javase/com/codename1/admob/AdMobNativeImpl.java:17: error: package java.util.logging does not exist
       [javac] import java.util.logging.Logger;
       [javac]                         ^
       [javac] 2 errors

1 个答案:

答案 0 :(得分:1)

我需要创建一个新的codenameone项目并将我的资源复制到其中。我的项目已经超过一年了。