尝试开发hello world,但在模拟器上获得强制关闭错误。提前谢谢
07-25 12:04:12.308: D/AndroidRuntime(277): Shutting down VM
07-25 12:04:12.308: W/dalvikvm(277): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
07-25 12:04:12.368: E/AndroidRuntime(277): FATAL EXCEPTION: main
07-25 12:04:12.368: E/AndroidRuntime(277): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.exampe.helloww/com.exampe.helloww.HelloActivity}: java.lang.ClassNotFoundException: com.exampe.helloww.HelloActivity in loader dalvik.system.PathClassLoader[/data/app/com.exampe.helloww-2.apk]
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.os.Handler.dispatchMessage(Handler.java:99)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.os.Looper.loop(Looper.java:123)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.reflect.Method.invokeNative(Native Method)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.reflect.Method.invoke(Method.java:521)
07-25 12:04:12.368: E/AndroidRuntime(277): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-25 12:04:12.368: E/AndroidRuntime(277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-25 12:04:12.368: E/AndroidRuntime(277): at dalvik.system.NativeStart.main(Native Method)
07-25 12:04:12.368: E/AndroidRuntime(277): Caused by: java.lang.ClassNotFoundException: com.exampe.helloww.HelloActivity in loader dalvik.system.PathClassLoader[/data/app/com.exampe.helloww-2.apk]
07-25 12:04:12.368: E/AndroidRuntime(277): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
07-25 12:04:12.368: E/AndroidRuntime(277): ... 11 more
07-25 12:04:17.158: I/Process(277): Sending signal. PID: 277 SIG: 9
答案 0 :(得分:0)
在Manifest文件中添加HelloActivity。由于找不到您的Activity,您将获得ClassNotFoundException
E / AndroidRuntime(277):引起:java.lang.ClassNotFoundException:
com.exampe.helloww.HelloActivity
答案 1 :(得分:0)
ClassNotFoundException