2015-04-16 61 views
0

我在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 

爲什麼會發生?

+0

發佈項目中的POM或碎片可能有助於診斷問題。 –

回答

0

你有沒有發現你的類MainActivity在這個類上指定的路徑異常錯誤?

拋出java.lang.ClassNotFoundException:找不到類「synch.ui.activities.concreteactivities.MainActivity」

此錯誤是行家找不到這個類。

+0

MainActivity存在,並在我選擇「更新項目」選項之前我的應用程序工作正常 – Junior222

相關問題