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


Solutions on the web

Solution icon of github
via GitHub by tony-young
, 1 year ago
Could not execute method for android:onClick

Solution icon of github
via GitHub by MicroKibaco
, 5 months ago
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Solution icon of stackoverflow
Could not execute method for android:onClick

Stack trace

java.lang.IllegalStateException: Could not execute method for android:onClick
	at android.view.View$DeclaredOnClickListener.onClick(View.java:4698)
	at android.view.View.performClick(View.java:5610)
	at android.view.View$PerformClick.run(View.java:22265)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6077)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at android.view.View$DeclaredOnClickListener.onClick(View.java:4693)
	... 9 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.Context.getTheme()' on a null object reference
	at android.app.AlertDialog.resolveDialogTheme(AlertDialog.java:222)
	at android.app.AlertDialog$Builder.<init>(AlertDialog.java:452)
	at com.creations.fabzheimers.sudoku.activity.marcellelek.showEndDialog(marcellelek.java:100)
	at com.creations.fabzheimers.sudoku.marcellelek.GameEngine.checkSudoku(GameEngine.java:53)
	at com.creations.fabzheimers.sudoku.activity.marcellelek.numPad6(marcellelek.java:58)
	... 11 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 1 year ago
49 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
8 more bugmates