java.lang.IllegalStateException: Could not find method doStuff (MainActivity)(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatButton with id 'button'

Android Enthusiasts | Logixor | 2 months ago
  1. 0

    Android Studio Could not find methods from MainActivity.java

    Android Enthusiasts | 2 months ago | Logixor
    java.lang.IllegalStateException: Could not find method doStuff (MainActivity)(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatButton with id 'button'
  2. 0

    Android RadioButtons in Fragment

    Stack Overflow | 5 months ago | barmi
    java.lang.IllegalStateException: Could not find method FirstQuestion(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatRadioButton with id 'test1from10question1answerA'
  3. 0

    Android Studio - image button is crashing after i click on it

    Stack Overflow | 10 months ago | Dragoon Shimizu
    java.lang.IllegalStateException: Could not find method myButton(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatImageButton with id 'RepeatingImage'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.IllegalStateException: Could not find method pretaxamount(View) in a parent or ancestor Context for android:onClick attribute defined

    Stack Overflow | 9 months ago | ZeroView
    java.lang.IllegalStateException: Could not find method pretaxamount(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatEditText with id 'Pre_tax_amount_ET'
  6. 0

    IllegalStateException when Setting ImageView Click Method

    Stack Overflow | 9 months ago | tccpg288
    java.lang.IllegalStateException: Could not find method toComments(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatImageView with id 'comments_label_icon'

  1. Mathan Chinna 1 times, last 4 months ago
  2. rube 28 times, last 2 months ago
  3. blaise 8 times, last 7 months ago
  4. Saravana Kumar Chinnaraj 1 times, last 7 months ago
  5. Nisha Singh 4 times, last 8 months ago
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Could not find method doStuff (MainActivity)(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatButton with id 'button'

    at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod()
  2. Android v7
    AppCompatViewInflater$DeclaredOnClickListener.onClick
    1. android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:327)
    2. android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:284)
    2 frames
  3. Android Platform
    ActivityThread.main
    1. android.view.View.performClick(View.java:4640)
    2. android.view.View$PerformClick.run(View.java:19425)
    3. android.os.Handler.handleCallback(Handler.java:733)
    4. android.os.Handler.dispatchMessage(Handler.java:95)
    5. android.os.Looper.loop(Looper.java:146)
    6. android.app.ActivityThread.main(ActivityThread.java:5593)
    6 frames
  4. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  5. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
    2 frames
  6. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame