我有一个使用ZXing库的应用程序。抱歉,java编译器设置到一定程度,我不记得了。我试图使用switch语句,eclipse抱怨编译器级别不正确。我点击快速修复,现在Eclipse发出以下错误。
11-21 16:38:56.090: E/AndroidRuntime(20001): FATAL EXCEPTION: main
11-21 16:38:56.090: E/AndroidRuntime(20001): java.lang.RuntimeException: Unable to instantiate application com.carefreegroup.NfcScannerApplication: java.lang.ClassNotFoundException: com.carefreegroup.NfcScannerApplication
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.app.LoadedApk.makeApplication(LoadedApk.java:529)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4532)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.app.ActivityThread.access$1300(ActivityThread.java:139)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.os.Handler.dispatchMessage(Handler.java:99)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.os.Looper.loop(Looper.java:156)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.app.ActivityThread.main(ActivityThread.java:5045)
11-21 16:38:56.090: E/AndroidRuntime(20001): at java.lang.reflect.Method.invokeNative(Native Method)
11-21 16:38:56.090: E/AndroidRuntime(20001): at java.lang.reflect.Method.invoke(Method.java:511)
11-21 16:38:56.090: E/AndroidRuntime(20001): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-21 16:38:56.090: E/AndroidRuntime(20001): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-21 16:38:56.090: E/AndroidRuntime(20001): at dalvik.system.NativeStart.main(Native Method)
11-21 16:38:56.090: E/AndroidRuntime(20001): Caused by: java.lang.ClassNotFoundException: com.carefreegroup.NfcScannerApplication
11-21 16:38:56.090: E/AndroidRuntime(20001): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
11-21 16:38:56.090: E/AndroidRuntime(20001): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
11-21 16:38:56.090: E/AndroidRuntime(20001): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.app.Instrumentation.newApplication(Instrumentation.java:948)
11-21 16:38:56.090: E/AndroidRuntime(20001): at android.app.LoadedApk.makeApplication(LoadedApk.java:520)
11-21 16:38:56.090: E/AndroidRuntime(20001): ... 11 more
我的应用程序称为nfcscannerappliction,我似乎得到了ClassNotFoundException。任何想法如何让我的应用程序再次编译?
答案 0 :(得分:0)
[解决]
我必须进入构建路径并单击java编译器按钮,将编译器合规性级别设置回1.6。该项目必须重建并且现在运行良好。
感谢