java.lang.IllegalStateException

Could not execute method for android:onClick

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web513

  • 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:4660) at android.view.View$PerformClick.run(View.java:19445) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5603) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288) ... 11 more Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2 at android.content.res.Resources.getText(Resources.java:1431) at android.support.v7.widget.ResourcesWrapper.getText(ResourcesWrapper.java:52) at android.widget.TextView.setText(TextView.java:4954) at com.example.abdulkarim.justjava.MainActivity.display(MainActivity.java:33) at com.example.abdulkarim.justjava.MainActivity.submit(MainActivity.java:24) ... 14 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

    spespe
    Once,
    maxximaxxi
    4 times, last one
    ajinkya_wajinkya_w
    3 times, last one
    Diogo JaymDiogo Jaym
    Once,
    Unknown visitor
    Unknown visitorOnce,
    53 more bugmates