我在设备上运行时遇到此错误.我一直在浏览这个问题,我很确定我没有提到的问题.我的两个活动都在
AndroidManifest中声明,而intent过滤器就在那里.我没有任何库(除了v4支持库,但声明它不会改变问题).我尝试用.MainActivity替换我的Manifest carpedujourproductions.quickpronote.MainActivity,但仍然没有运气.我正在运行Android Studio 0.2.5,所以我找不到如何解决与Java Build Path / Order and Export相关的潜在问题
我忍不住注意到我的MainActivity图标在树的左上角有一个灰色的十字架.
logcat的:
E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{carpedujourproductions.quickpronote/carpedujourproductions.quickpronote.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "carpedujourproductions.quickpronote.MainActivity" on path: DexPathList[[zip file "/data/app/carpedujourproductions.quickpronote-2.apk"],nativeLibraryDirectories=[/data/app-lib/carpedujourproductions.quickpronote-2,/vendor/lib,/system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2281) at android.app.ActivityThread.access$600(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1263) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5124) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:110) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: Didn't find class "carpedujourproductions.quickpronote.MainActivity" on path: DexPathList[[zip file "/data/app/carpedujourproductions.quickpronote-2.apk"],/system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53) at java.lang.ClassLoader.loadClass(ClassLoader.java:501) at java.lang.ClassLoader.loadClass(ClassLoader.java:461) at android.app.Instrumentation.newActivity(Instrumentation.java:1061) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) ... 12 more