10-25 05:30:06.560: W/dalvikvm(1428): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
10-25 05:30:06.670: E/AndroidRuntime(1428): FATAL EXCEPTION: main
10-25 05:30:06.670: E/AndroidRuntime(1428): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.androidhiv/com.example.androidhiv.AllProductsActivity}; have you declared this activity in your AndroidManifest.xml?
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1618)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.app.Activity.startActivityForResult(Activity.java:3370)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.app.Activity.startActivityForResult(Activity.java:3331)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.app.Activity.startActivity(Activity.java:3566)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.app.Activity.startActivity(Activity.java:3534)
10-25 05:30:06.670: E/AndroidRuntime(1428): at com.example.androidhiv.MainScreenActivity$1.onClick(MainScreenActivity.java:31)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.view.View.performClick(View.java:4204)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.view.View$PerformClick.run(View.java:17355)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.os.Handler.handleCallback(Handler.java:725)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.os.Handler.dispatchMessage(Handler.java:92)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.os.Looper.loop(Looper.java:137)
10-25 05:30:06.670: E/AndroidRuntime(1428): at android.app.ActivityThread.main(ActivityThread.java:5041)
10-25 05:30:06.670: E/AndroidRuntime(1428): at java.lang.reflect.Method.invokeNative(Native Method)
10-25 05:30:06.670: E/AndroidRuntime(1428): at java.lang.reflect.Method.invoke(Method.java:511)
10-25 05:30:06.670: E/AndroidRuntime(1428): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
10-25 05:30:06.670: E/AndroidRuntime(1428): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10-25 05:30:06.670: E/AndroidRuntime(1428): at dalvik.system.NativeStart.main(Native Method)
问问题
138 次
4 回答
1
确保此 Activity 已在 Android Manifeast 中注册
于 2013-10-29T04:58:35.387 回答
0
它表明您尚未AllProductsActivity
在清单文件中声明您的。
<activity
android:name="com.example.androidhiv.AllProductsActivity"
/>
于 2013-10-29T04:56:56.360 回答
0
您尚未在清单文件中声明 Activity AllProductsActivity并且编译器无法找到该 Activity 因此引发错误。
在清单文件中声明 Activity AllProductsActivity 。
像这样
<activity android:name="com.example.androidhiv.AllProductsActivity"
></activity>
于 2013-10-29T04:56:31.837 回答
0
Acticity
您必须声明要在应用程序中显示的每一个都必须在AndroidManifest.xml
文件中声明。
<activity android:name="com.example.androidhiv.AllProductsActivity" />
于 2013-10-29T04:59:42.710 回答