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

Stack Overflow | Bartek Arek | 6 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    change color in strings.xml and onClick method

    Stack Overflow | 6 months ago | Bartek Arek
    java.lang.IllegalStateException: Could not execute method for android:onClick

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.text.SpannedString cannot be cast to java.lang.String

      at com.example.barto.konwerter2.GlownaPredkosc.konwertuj()
    2. com.example.barto
      GlownaPredkosc.konwertuj
      1. com.example.barto.konwerter2.GlownaPredkosc.konwertuj(GlownaPredkosc.java:73)
      1 frame
    3. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    4. Android Platform
      ActivityThread.main
      1. android.view.View$DeclaredOnClickListener.onClick(View.java:4447)
      2. android.view.View.performClick(View.java:5198)
      3. android.view.View$PerformClick.run(View.java:21147)
      4. android.os.Handler.handleCallback(Handler.java:739)
      5. android.os.Handler.dispatchMessage(Handler.java:95)
      6. android.os.Looper.loop(Looper.java:148)
      7. android.app.ActivityThread.main(ActivityThread.java:5417)
      7 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame