2015-02-09 215 views
-2

我在eclipse中將我的項目重命名爲我試圖在我的設備上運行我的應用程序。但自從我收到不幸之後,App就停止了。我手動編輯AndroidManifest.xml來檢查文件路徑是否正確,因爲AndroidManifest似乎沒有反映重命名項目後的更改,如果您有所幫助,我將不勝感激。這裏是logcat的重命名後應用程序崩潰

02-09 11:38:43.872: D/AndroidRuntime(26838): Shutting down VM 02-09 11:38:43.880: E/AndroidRuntime(26838): FATAL EXCEPTION: main 02-09 11:38:43.880: E/AndroidRuntime(26838): Process: com.ummahtalk.community, PID: 26838 02-09 11:38:43.880: E/AndroidRuntime(26838): java.lang.RuntimeException: Unable to instantiate application com.ummahtalk.community.SpikaApp: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.LoadedApk.makeApplication(LoadedApk.java:563) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread.access$1500(ActivityThread.java:144) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.os.Handler.dispatchMessage(Handler.java:102) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.os.Looper.loop(Looper.java:135) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.ActivityThread.main(ActivityThread.java:5221) 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.reflect.Method.invoke(Native Method) 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.reflect.Method.invoke(Method.java:372) 02-09 11:38:43.880: E/AndroidRuntime(26838): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 02-09 11:38:43.880: E/AndroidRuntime(26838): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 02-09 11:38:43.880: E/AndroidRuntime(26838): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 02-09 11:38:43.880: E/AndroidRuntime(26838): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.Instrumentation.newApplication(Instrumentation.java:979) 02-09 11:38:43.880: E/AndroidRuntime(26838): at android.app.LoadedApk.makeApplication(LoadedApk.java:558) 02-09 11:38:43.880: E/AndroidRuntime(26838): ... 10 more 02-09 11:38:43.880: E/AndroidRuntime(26838): Suppressed: java.lang.ClassNotFoundException: com.ummahtalk.community.SpikaApp 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.Class.classForName(Native Method) 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 02-09 11:38:43.880: E/AndroidRuntime(26838): at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 02-09 11:38:43.880: E/AndroidRuntime(26838): ... 13 more 02-09 11:38:43.880: E/AndroidRuntime(26838): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 02-09 11:38:53.991: D/AndroidRuntime(27142): Shutting down VM 02-09 11:38:53.993: E/AndroidRuntime(27142): FATAL EXCEPTION: main 02-09 11:38:53.993: E/AndroidRuntime(27142): Process: com.ummahtalk.community, PID: 27142 02-09 11:38:53.993: E/AndroidRuntime(27142): java.lang.RuntimeException: Unable to instantiate application com.ummahtalk.community.SpikaApp: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.LoadedApk.makeApplication(LoadedApk.java:563) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread.access$1500(ActivityThread.java:144) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.os.Handler.dispatchMessage(Handler.java:102) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.os.Looper.loop(Looper.java:135) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.ActivityThread.main(ActivityThread.java:5221) 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.reflect.Method.invoke(Native Method) 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.reflect.Method.invoke(Method.java:372) 02-09 11:38:53.993: E/AndroidRuntime(27142): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 02-09 11:38:53.993: E/AndroidRuntime(27142): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 02-09 11:38:53.993: E/AndroidRuntime(27142): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ummahtalk.community.SpikaApp" on path: DexPathList[[zip file "/data/app/com.ummahtalk.community-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 02-09 11:38:53.993: E/AndroidRuntime(27142): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.Instrumentation.newApplication(Instrumentation.java:979) 02-09 11:38:53.993: E/AndroidRuntime(27142): at android.app.LoadedApk.makeApplication(LoadedApk.java:558) 02-09 11:38:53.993: E/AndroidRuntime(27142): ... 10 more 02-09 11:38:53.993: E/AndroidRuntime(27142): Suppressed: java.lang.ClassNotFoundException: com.ummahtalk.community.SpikaApp 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.Class.classForName(Native Method) 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 02-09 11:38:53.993: E/AndroidRuntime(27142): at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 02-09 11:38:53.993: E/AndroidRuntime(27142): ... 13 more 02-09 11:38:53.993: E/AndroidRuntime(27142): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 02-09 11:39:54.371: I/Process(27142): Sending signal. PID: 27142 SIG: 9

+0

這是一個簡單的錯誤,我的建議是在發佈問題前做一些Google。但是,您的應用程序必須有一個名爲「SpikaApp」的活動,並且它必須位於「com.ummahtalk.community」包中,並且您的清單中應該有相同的名稱。 – theJango 2015-02-09 06:59:52

+0

對不起,但我對Android很新 – letmetry7 2015-02-09 07:04:12

回答

0

我一直在使用的Android工具>>重命名應用程序包重命名該項目,但後來我想通了,一切都沒有改名正確然後我試圖做重構>重新命名和它解決它

0

剛剛面對確切的問題。我嘗試了以上所有未解決的解決方案。 我通過退出android studio來修復它,將整個項目文件夾複製到新位置,啓動android studio並從新位置打開項目。