Issue
Hi when I run my app and click a button within my app, it then stops due to clicking the button, I get this in my Log cat, any help would be very helpful
04-13 16:43:15.435: D/AndroidRuntime(540): Shutting down VM
04-13 16:43:15.445: W/dalvikvm(540): threadid=1: thread exiting with uncaught exception (group=0x409961f8)
04-13 16:43:15.485: E/AndroidRuntime(540): FATAL EXCEPTION: main
04-13 16:43:15.485: E/AndroidRuntime(540): java.lang.IllegalStateException: Could not execute method of the activity
04-13 16:43:15.485: E/AndroidRuntime(540): at android.view.View$1.onClick(View.java:3039)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.view.View.performClick(View.java:3480)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.view.View$PerformClick.run(View.java:13983)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.os.Handler.handleCallback(Handler.java:605)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.os.Handler.dispatchMessage(Handler.java:92)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.os.Looper.loop(Looper.java:137)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.app.ActivityThread.main(ActivityThread.java:4340)
04-13 16:43:15.485: E/AndroidRuntime(540): at java.lang.reflect.Method.invokeNative(Native Method)
04-13 16:43:15.485: E/AndroidRuntime(540): at java.lang.reflect.Method.invoke(Method.java:511)
04-13 16:43:15.485: E/AndroidRuntime(540): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-13 16:43:15.485: E/AndroidRuntime(540): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-13 16:43:15.485: E/AndroidRuntime(540): at dalvik.system.NativeStart.main(Native Method)
04-13 16:43:15.485: E/AndroidRuntime(540): Caused by: java.lang.reflect.InvocationTargetException
04-13 16:43:15.485: E/AndroidRuntime(540): at java.lang.reflect.Method.invokeNative(Native Method)
04-13 16:43:15.485: E/AndroidRuntime(540): at java.lang.reflect.Method.invoke(Method.java:511)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.view.View$1.onClick(View.java:3034)
04-13 16:43:15.485: E/AndroidRuntime(540): ... 11 more
04-13 16:43:15.485: E/AndroidRuntime(540): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.SaverEvent/com.example.SaverEvent.MainActivity}; have you declared this activity in your AndroidManifest.xml?
04-13 16:43:15.485: E/AndroidRuntime(540): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.app.Activity.startActivityForResult(Activity.java:3190)
04-13 16:43:15.485: E/AndroidRuntime(540): at android.app.Activity.startActivity(Activity.java:3297)
04-13 16:43:15.485: E/AndroidRuntime(540): at com.example.SaverEvent.NewEvent.callHomeActivity(NewEvent.java:35)
04-13 16:43:15.485: E/AndroidRuntime(540): at com.example.SaverEvent.NewEvent.addNewEvent(NewEvent.java:31)
04-13 16:43:15.485: E/AndroidRuntime(540): ... 14 more
04-13 16:43:17.995: I/Process(540): Sending signal. PID: 540 SIG: 9
Solution
I think, your button is going to another activity in your project. But you don't declare your second activity in manifest file. It's just my guess, because I don't see your code. If I'm not wrong, you need to add one line after your first activity in your manifest file.
<activity android:name="com.example.SaverEvent.YOUR_SECOND_ACTIVITY" ></ activity>
Hope this help.
Answered By - NML Android
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.