java.lang.IllegalStateException: Could not execute method for android:onClick

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

java.lang.IllegalStateException: Could not execute method for android:onClick
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1633)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1425)
at android.app.Activity.startActivityForResult(Activity.java:3370)
at android.app.Activity.startActivity(Activity.java:3566)
at android.app.Activity.startActivity(Activity.java:3534)
at com.example.unholyalliance.infinitestream.MainActivity.host(MainActivity.java:23)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View.performClick(View.java:4278)
at android.view.View$PerformClick.run(View.java:17429)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5099)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)

Users with the same issue

2 times, 1 year ago
2 times, 1 year ago
Once, 1 year ago
Once, 1 year ago
3 times, 1 year ago
94 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.