java.lang.RuntimeException: Unable to create application sk.baka.aedict3.AedictApp: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

GitHub | mvysny | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    preferences: ClassCastException: java.lang.Integer cannot be cast to java.lang.String

    GitHub | 6 months ago | mvysny
    java.lang.RuntimeException: Unable to create application sk.baka.aedict3.AedictApp: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

    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
      PreferenceManager.setDefaultValues
      1. android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:224)
      2. android.preference.Preference.getPersistedString(Preference.java:1406)
      3. android.preference.ListPreference.onSetInitialValue(ListPreference.java:278)
      4. android.preference.Preference.dispatchSetInitialValue(Preference.java:1322)
      5. android.preference.Preference.onAttachedToHierarchy(Preference.java:1134)
      6. android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:163)
      7. android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:104)
      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.rInflate(GenericInflater.java:493)
      12. android.preference.GenericInflater.inflate(GenericInflater.java:326)
      13. android.preference.GenericInflater.inflate(GenericInflater.java:263)
      14. android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:269)
      15. android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:482)
      16. android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:441)
      16 frames
    3. sk.baka.aedict3
      AedictApp.onCreate
      1. sk.baka.aedict3.AedictApp.onCreate(AedictApp.java:113)
      1 frame
    4. Android Platform
      ActivityThread.main
      1. android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1000)
      2. android.app.ActivityThread.handleBindApplication(ActivityThread.java:4391)
      3. android.app.ActivityThread.access$1300(ActivityThread.java:141)
      4. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
      5. android.os.Handler.dispatchMessage(Handler.java:99)
      6. android.os.Looper.loop(Looper.java:137)
      7. android.app.ActivityThread.main(ActivityThread.java:5041)
      7 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
      2 frames
    7. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame