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


Solutions on the web337

Solution icon of stackoverflow
via Stack Overflow by user5425093
, 11 months ago
Could not execute method for android:onClick

Solution icon of stackoverflow
via Stack Overflow by Alejandro Soto
, 11 months ago
Could not execute method for android:onClick

Solution icon of stackoverflow
via Stack Overflow by C. Marr
, 8 months ago
Could not execute method for android:onClick

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

Solution icon of stackoverflow
via Stack Overflow by Noah
, 1 month 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
via Stack Overflow by Jeff
, 4 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

Stack trace

java.lang.IllegalStateException: Could not execute method for android:onClick
	at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:293)
	at android.view.View.performClick(View.java:5697)
	at android.widget.TextView.performClick(TextView.java:10814)
	at android.view.View$PerformClick.run(View.java:22526)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:158)
	at android.app.ActivityThread.main(ActivityThread.java:7229)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288)
	... 10 more
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0xa
	at android.content.res.Resources.getText(Resources.java:1468)
	at android.widget.TextView.setText(TextView.java:5040)
	at com.example.android.headsuppokercounter.MainActivity.displayBetPlayer1(MainActivity.java:551)
	at com.example.android.headsuppokercounter.MainActivity.incrementP1(MainActivity.java:501)
	... 12 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
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 months ago
6 times, 3 months ago
4 times, 8 months ago
2 times, 8 months ago
55 more bugmates