ClassNotFoundException: Didn't find class "android.os.PersistableBundle" Otto Android 5.0 ClassNotFoundException: Didn't find class "android.os.PersistableBundle" Otto Android 5.0 android android

ClassNotFoundException: Didn't find class "android.os.PersistableBundle" Otto Android 5.0


I find the "solution". Just remove this function from your activity :

@Overridepublic void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {    super.onSaveInstanceState(outState, outPersistentState);}


Change targetVersion to the API version of the device you are running.

I had targetVersion = 21 when my device had 4.4 (API 19), changing the value to 19 solved the issue.


I had a same problem on Samsung Galaxy 3mini and Local operator phones.But i fixed with override activity method.i hope it works for you.

 @Overrideprotected void onRestoreInstanceState(Bundle savedInstanceState) {    super.onRestoreInstanceState(savedInstanceState);    try {        BusApplication.getInstance().register(this);    } catch (Exception e) {        e.printStackTrace();    }}