java.lang.IllegalStateException

Could not execute method for android:onClick

Solutions on the web19614

  • via GitHub by svalo
    , 1 year ago
    Could not execute method for android:onClick
  • via GitHub by btusca
    , 1 year ago
    Could not execute method for android:onClick
  • via GitHub by ascoril
    , 8 months ago
    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: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.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288) ... 9 more Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.tristan.a1p1n1/com.example.tristan.a1p1n1.DICS}; have you declared this activity in your AndroidManifest.xml? at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1805) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1523) at android.app.Activity.startActivityForResult(Activity.java:4224) at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50) at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79) at android.app.Activity.startActivityForResult(Activity.java:4183) at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859) at android.app.Activity.startActivity(Activity.java:4507) at android.app.Activity.startActivity(Activity.java:4475) at com.example.tristan.a1p1n1.MainActivity.sendMessage(MainActivity.java:41) ... 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

    2 times, 2 weeks ago
    4 times, 5 months ago
    47 times, 6 months ago
    6 times, 8 months ago
    3 times, 8 months ago
    94 more bugmates