java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.mms/com.android.mms.ui.MessagingPreferenceActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

JIRA | Marek Wasilewski | 2 years ago
  1. 0

    Hi Yesterday I updated my oneplus one via OTA and every time I try to send SMS or read received one I get the following error: {code} java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.mms/com.android.mms.ui.MessagingPreferenceActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389) at android.app.ActivityThread.access$900(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1296) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693) Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:223) at android.preference.Preference.getPersistedString(Preference.java:1468) at android.preference.ListPreference.onSetInitialValue(ListPreference.java:294) at android.preference.Preference.dispatchSetInitialValue(Preference.java:1384) at android.preference.Preference.onAttachedToHierarchy(Preference.java:1171) at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:167) at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:108) at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:45) at android.preference.GenericInflater.rInflate(GenericInflater.java:488) at android.preference.GenericInflater.rInflate(GenericInflater.java:493) at android.preference.GenericInflater.inflate(GenericInflater.java:326) at android.preference.GenericInflater.inflate(GenericInflater.java:263) at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:272) at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:1513) at com.android.mms.ui.MessagingPreferenceActivity.loadPrefs(MessagingPreferenceActivity.java:294) at com.android.mms.ui.MessagingPreferenceActivity.onCreate(MessagingPreferenceActivity.java:233) at android.app.Activity.performCreate(Activity.java:5933) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2282) ... 10 more {code} Basically SMS are useless now. I can't do anything with them. Should I delete all my messages and try to create one? Any ideas? Pls help :)

    JIRA | 2 years ago | Marek Wasilewski
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.mms/com.android.mms.ui.MessagingPreferenceActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
  2. 0

    Hi Yesterday I updated my oneplus one via OTA and every time I try to send SMS or read received one I get the following error: {code} java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.mms/com.android.mms.ui.MessagingPreferenceActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389) at android.app.ActivityThread.access$900(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1296) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693) Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:223) at android.preference.Preference.getPersistedString(Preference.java:1468) at android.preference.ListPreference.onSetInitialValue(ListPreference.java:294) at android.preference.Preference.dispatchSetInitialValue(Preference.java:1384) at android.preference.Preference.onAttachedToHierarchy(Preference.java:1171) at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:167) at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:108) at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:45) at android.preference.GenericInflater.rInflate(GenericInflater.java:488) at android.preference.GenericInflater.rInflate(GenericInflater.java:493) at android.preference.GenericInflater.inflate(GenericInflater.java:326) at android.preference.GenericInflater.inflate(GenericInflater.java:263) at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:272) at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:1513) at com.android.mms.ui.MessagingPreferenceActivity.loadPrefs(MessagingPreferenceActivity.java:294) at com.android.mms.ui.MessagingPreferenceActivity.onCreate(MessagingPreferenceActivity.java:233) at android.app.Activity.performCreate(Activity.java:5933) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2282) ... 10 more {code} Basically SMS are useless now. I can't do anything with them. Should I delete all my messages and try to create one? Any ideas? Pls help :)

    JIRA | 2 years ago | Marek Wasilewski
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.mms/com.android.mms.ui.MessagingPreferenceActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
  3. 0

    Android crashing on ListPreference

    Stack Overflow | 5 years ago | pirezas
    java.lang.RuntimeException: Unable to start activity ComponentInfo{cPreferencesActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Reading settings crashes Aedict

    GitHub | 2 weeks ago | mvysny
    java.lang.RuntimeException: Unable to start activity ComponentInfo{sk.baka.aedict3/sk.baka.aedict3.ConfigActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
  6. 0

    persistFloat in custom EditTextPreference causes crash

    GitHub | 4 years ago | jkwiecien
    java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.String

    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.ClassCastException

      java.lang.Integer cannot be cast to java.lang.String

      at android.app.SharedPreferencesImpl.getString()
    2. Android Platform
      PreferenceActivity.addPreferencesFromResource
      1. android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:223)
      2. android.preference.Preference.getPersistedString(Preference.java:1468)
      3. android.preference.ListPreference.onSetInitialValue(ListPreference.java:294)
      4. android.preference.Preference.dispatchSetInitialValue(Preference.java:1384)
      5. android.preference.Preference.onAttachedToHierarchy(Preference.java:1171)
      6. android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:167)
      7. android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:108)
      8. android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:45)
      9. android.preference.GenericInflater.rInflate(GenericInflater.java:488)
      10. android.preference.GenericInflater.rInflate(GenericInflater.java:493)
      11. android.preference.GenericInflater.inflate(GenericInflater.java:326)
      12. android.preference.GenericInflater.inflate(GenericInflater.java:263)
      13. android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:272)
      14. android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:1513)
      14 frames
    3. com.android.mms
      MessagingPreferenceActivity.onCreate
      1. com.android.mms.ui.MessagingPreferenceActivity.loadPrefs(MessagingPreferenceActivity.java:294)
      2. com.android.mms.ui.MessagingPreferenceActivity.onCreate(MessagingPreferenceActivity.java:233)
      2 frames
    4. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:5933)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2282)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2389)
      5. android.app.ActivityThread.access$900(ActivityThread.java:147)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1296)
      7. android.os.Handler.dispatchMessage(Handler.java:102)
      8. android.os.Looper.loop(Looper.java:135)
      9. android.app.ActivityThread.main(ActivityThread.java:5254)
      9 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
      2 frames