我在Eclipse中遇到了一個奇怪的Maven問題。我試圖添加一些依賴到我的項目,但我失敗了。爲了解決這個問題,我右鍵單擊項目並在下拉菜單中選擇Maven-> Update項目。之後,當我嘗試運行它時,我的項目崩潰。我在LogCat中出現以下錯誤:maven更新項目後應用程序崩潰
FATAL EXCEPTION: main
Process: com.my.synch, PID: 16267
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.my.synch/synch.ui.activities.concreteactivities.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "synch.ui.activities.concreteactivities.MainActivity" on path: DexPathList[[zip file "/data/app/com.my.synch-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.my.synch-1, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2163)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "synch.ui.activities.concreteactivities.MainActivity" on path: DexPathList[[zip file "/data/app/com.my.synch-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.my.synch-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2154)
... 11 more
爲什麼會發生?
發佈項目中的POM或碎片可能有助於診斷問題。 –