1
votes

I'm trying to build a project that I have not build in over a year. I have the latest codename one plugin, get the following errors:

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

error: cannot find symbol [javac] import java.io.BufferedInputStream;

Any idea on how to get this compiling again? I'm using eclipse neon

Just realized these extensions are being compiled with javase instead of android. lib/impl/native/javase. I'm performing a send android build, is there a setting for this that I need to add?

Buildfile: /Users/sam/dev/wordtime5/codeone/codename1/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 19 files to /Users/sam/dev/wordtime5/codeone/codename1/build/tmp
        [copy] Copying 37 files to /Users/sam/dev/wordtime5/codeone/codename1/build/tmp
       [javac] /Users/sam/dev/wordtime5/codeone/codename1/build.xml:147: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
       [javac] Compiling 101 source files to /Users/sam/dev/wordtime5/codeone/codename1/build/tmp
       [javac] Note: Some input files use unchecked or unsafe operations.
       [javac] Note: Recompile with -Xlint:unchecked for details.
        [copy] Copying 281 files to /Users/sam/dev/wordtime5/codeone/codename1/build/tmp
         [jar] Building jar: /Users/sam/dev/wordtime5/codeone/codename1/dist/CN1WordTime5.jar
       [javac] /Users/sam/dev/wordtime5/codeone/codename1/build.xml:171: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
       [javac] Compiling 32 source files to /Users/sam/dev/wordtime5/codeone/codename1/native/internal_tmp
       [javac] /Users/sam/dev/wordtime5/codeone/codename1/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/codeone/codename1/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] /Users/sam/dev/wordtime5/codeone/codename1/lib/impl/native/javase/com/neovisionaries/ws/client/WebSocket.java:24: error: cannot find symbol
       [javac] import java.io.BufferedInputStream;
       [javac]               ^
       [javac]   symbol:   class BufferedInputStream
       [javac]   location: package java.io
       [javac] /Users/sam/dev/wordtime5/codeone/codename1/lib/impl/native/javase/com/neovisionaries/ws/client/WebSocket.java:25: error: cannot find symbol
       [javac] import java.io.BufferedOutputStream;
       [javac]               ^
       [javac]   symbol:   class BufferedOutputStream
       [javac]   location: package java.io
       [javac] /Users/sam/dev/wordtime5/codeone/codename1/lib/impl/native/javase/com/neovisionaries/ws/client/WebSocket.java:27: error: cannot find symbol
       [javac] import java.net.Socket;
       [javac]                ^
       [javac]   symbol:   class Socket
       [javac]   location: package java.net
1
Just realized these "extensions" are being compiled with javase instead of android. "lib/impl/native/javase". I'm performing a "send android build". Is there a setting for this I need to add? - sam

1 Answers

1
votes

This usually happens when you use auto try-catch for exceptions, it adds java Logger automatically.

Do a project search for Logger, and remove all its Usage (Including it's import).

Logger is not supported in Codename One as CN1 has it's own Logger which is com.codename1.io.Log