java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable

Appcelerator JIRA | Andrew Greenstreet | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I'm getting this crash report on Google Play for a Galaxy Axiom {code} java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable at android.widget.TextView.setEnabled(TextView.java:1432) at org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1457) at org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1271) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:472) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:566) at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:218) at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:100) at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4962) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771) at dalvik.system.NativeStart.main(Native Method) {code} My preliminary research indicates this can happen when calling "setEnabled" on a TextView that doesn't yet have a value. You can find our app @ https://play.google.com/store/apps/details?id=com.findingrover.findingrover If you happen to have a Samsung Axiom laying around running Android 4.1

    Appcelerator JIRA | 3 years ago | Andrew Greenstreet
    java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable
  2. 0

    I'm getting this crash report on Google Play for a Galaxy Axiom {code} java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable at android.widget.TextView.setEnabled(TextView.java:1432) at org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1457) at org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1271) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:472) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449) at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:566) at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:218) at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:100) at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4962) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771) at dalvik.system.NativeStart.main(Native Method) {code} My preliminary research indicates this can happen when calling "setEnabled" on a TextView that doesn't yet have a value. You can find our app @ https://play.google.com/store/apps/details?id=com.findingrover.findingrover If you happen to have a Samsung Axiom laying around running Android 4.1

    Appcelerator JIRA | 3 years ago | Andrew Greenstreet
    java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable
  3. 0

    Fatal Exception: String can't be cast to Spannable

    Stack Overflow | 4 years ago | user1857437
    java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android Button attributes

    Stack Overflow | 4 years ago | user1857437
    java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable
  6. 0

    Crash on small number of android devices

    GitHub | 3 years ago | battlebottle
    java.lang.RuntimeException: Unable to start activity ComponentInfo{net.teamworkpm.phone/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable

    Root Cause Analysis

    1. java.lang.ClassCastException

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

      at android.widget.TextView.setEnabled()
    2. Android Platform
      TextView.setEnabled
      1. android.widget.TextView.setEnabled(TextView.java:1432)
      1 frame
    3. org.appcelerator.titanium
      TiWindowProxy.handleMessage
      1. org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1457)
      2. org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1271)
      3. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:472)
      4. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)
      5. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)
      6. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)
      7. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)
      8. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)
      9. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)
      10. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)
      11. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)
      12. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)
      13. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)
      14. org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:566)
      15. org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:218)
      16. org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:100)
      16 frames
    4. ti.modules.titanium
      WindowProxy.handleMessage
      1. ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443)
      1 frame
    5. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:95)
      2. android.os.Looper.loop(Looper.java:137)
      3. android.app.ActivityThread.main(ActivityThread.java:4962)
      3 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
      2 frames
    8. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame