我在eclipse中有两个项目。一个是我用SVN下载的java项目,并使用Maven来处理它的依赖项。我能够编译它,并按照我关注的说明将生成的jar文件添加到另一个Android项目。后者也使用了Maven。我有一堆错误;通过将编译器版本从1.5更改为1.6来处理大部分问题。 关于2种方法存在两个剩余错误,这些错误未在JAVA项目中实现。我编辑了该文件,并添加了该方法。但我在Android项目中的错误并没有消失。 android项目引用,并查看java项目中的其余方法和类。你能帮我解决这个问题吗?我该怎么办或检查一下?您需要哪些信息来提供帮助?
重新启动eclipse后,错误消失了。我之前尝试过重启,但似乎我不得不让eclipse在更长的时间内保持关闭状态。
现在,当我尝试运行它时,我在logcat中遇到以下异常错误:
03-25 13:10:19.978: D/AndroidRuntime(31035): Shutting down VM
03-25 13:10:19.978: W/dalvikvm(31035): threadid=1: thread exiting with uncaught exception (group=0x415fbc80)
03-25 13:10:19.978: E/AndroidRuntime(31035): FATAL EXCEPTION: main
03-25 13:10:19.978: E/AndroidRuntime(31035): Process: org.nick.nfc.seaccess, PID: 31035
03-25 13:10:19.978: E/AndroidRuntime(31035): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.nick.nfc.seaccess/org.nick.nfc.seaccess.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "org.nick.nfc.seaccess.MainActivity" on path: DexPathList[[zip file "/system/framework/com.android.nfc_extras.jar", zip file "/data/app/org.nick.nfc.seaccess-2.apk"],nativeLibraryDirectories=[/data/app-lib/org.nick.nfc.seaccess-2, /vendor/lib, /system/lib]]
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2131)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.app.ActivityThread.access$800(ActivityThread.java:145)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.os.Handler.dispatchMessage(Handler.java:102)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.os.Looper.loop(Looper.java:136)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.app.ActivityThread.main(ActivityThread.java:5081)
03-25 13:10:19.978: E/AndroidRuntime(31035): at java.lang.reflect.Method.invokeNative(Native Method)
03-25 13:10:19.978: E/AndroidRuntime(31035): at java.lang.reflect.Method.invoke(Method.java:515)
03-25 13:10:19.978: E/AndroidRuntime(31035): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
03-25 13:10:19.978: E/AndroidRuntime(31035): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-25 13:10:19.978: E/AndroidRuntime(31035): at dalvik.system.NativeStart.main(Native Method)
03-25 13:10:19.978: E/AndroidRuntime(31035): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.nick.nfc.seaccess.MainActivity" on path: DexPathList[[zip file "/system/framework/com.android.nfc_extras.jar", zip file "/data/app/org.nick.nfc.seaccess-2.apk"],nativeLibraryDirectories=[/data/app-lib/org.nick.nfc.seaccess-2, /vendor/lib, /system/lib]]
03-25 13:10:19.978: E/AndroidRuntime(31035): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
03-25 13:10:19.978: E/AndroidRuntime(31035): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
03-25 13:10:19.978: E/AndroidRuntime(31035): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
03-25 13:10:19.978: E/AndroidRuntime(31035): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2122)
03-25 13:10:19.978: E/AndroidRuntime(31035): ... 11 more
03-25 13:10:22.318: I/Process(31035): Sending signal. PID: 31035 SIG: 9