java.lang.RuntimeException

Unable to start activity ComponentInfo{org.kegbot.app/org.kegbot.app.SettingsActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web18

  • via GitHub by thehijjt
    ,
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{org.kegbot.app/org.kegbot.app.SettingsActivity}: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 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:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at android.app.SharedPreferencesImpl.getBoolean(SharedPreferencesImpl.java:260) at android.preference.Preference.getPersistedBoolean(Preference.java:1691) at android.preference.TwoStatePreference.onSetInitialValue(TwoStatePreference.java:187) at android.preference.Preference.dispatchSetInitialValue(Preference.java:1376) 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.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:299) at org.kegbot.app.SettingsActivity$KegeratorFragment.onCreate(SettingsActivity.java:101) at android.app.Fragment.performCreate(Fragment.java:2031) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:863) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) at android.app.BackStackRecord.run(BackStackRecord.java:834) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1452) at android.app.Activity.performStart(Activity.java:6005) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Stefan BrauneStefan Braune
    38 times, last one
    martynmartyn
    Once,
    faisalmohd83faisalmohd83
    5 times, last one