Eclipse,我无法在手机上启动新项目

时间:2014-10-29 21:05:34

标签: android eclipse

我有问题。我创建了一个新的android应用程序项目,只是简单的hello world并尝试在我的手机上运行它(4.3 android)。

我的应用。正在启动并突然关闭并显示消息,例如"应用已停止"。

0个错误,0错误我没有改变代码中的任何内容。 只有在logcat中我认为有些不对劲。

    10-29 21:58:07.226: W/dalvikvm(4954): Unable to resolve superclass ofLcom/example/psw2/MainActivity; (2)
10-29 21:58:07.226: W/dalvikvm(4954): Link of class 'Lcom/example/psw2/MainActivity;' failed
10-29 21:58:07.231: D/AndroidRuntime(4954): Shutting down VM
10-29 21:58:07.231: W/dalvikvm(4954): threadid=1: thread exiting with uncaught exception (group=0x41f0b700)
10-29 21:58:07.236: E/AndroidRuntime(4954): FATAL EXCEPTION: main
10-29 21:58:07.236: E/AndroidRuntime(4954): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.psw2/com.example.psw2.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.psw2.MainActivity" on path: /data/app/com.example.psw2-1.apk
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.app.ActivityThread.access$700(ActivityThread.java:159)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.os.Looper.loop(Looper.java:176)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.app.ActivityThread.main(ActivityThread.java:5419)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at java.lang.reflect.Method.invokeNative(Native Method)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at java.lang.reflect.Method.invoke(Method.java:525)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at dalvik.system.NativeStart.main(Native Method)
10-29 21:58:07.236: E/AndroidRuntime(4954): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.psw2.MainActivity" on path: /data/app/com.example.psw2-1.apk
10-29 21:58:07.236: E/AndroidRuntime(4954):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
10-29 21:58:07.236: E/AndroidRuntime(4954):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
10-29 21:58:07.236: E/AndroidRuntime(4954):     ... 11 more

1 个答案:

答案 0 :(得分:0)

好的,我明白了!

我必须勾选订单并导出所有商品并运行!

感谢您的帮助