sam
sam

Reputation: 175

codenameone uses javase for extensions in android project. build fails

Project will not build: error: package java.util.logging does not exist [javac] import java.util.logging.Level;

Steps to reproduce: (eclipse neon) 1. create a new codenameone project. 2. open codenameone settings, download admob extension 3. refresh cn1libraries.

Gets the following errors. Note that the native android does not have the java util. Why is it using 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

Upvotes: 1

Views: 70

Answers (1)

sam
sam

Reputation: 175

I needed to create a new codenameone project and copy my sources into that. My project was over a year old.

Upvotes: 1

Related Questions