-
Notifications
You must be signed in to change notification settings - Fork 846
java.lang.NoClassDefFoundError for android/os/PersistableBundle during registering activity on Bus #139
Comments
Same thing for us. |
I don't think it has anythink to do with Otto. |
We had a (similar) issue when using Bus in a class which referenced 'Objects' type. |
I have the same issue after deploy successfully on a Lollipop device and try to deploy on a 4.4.4 device. |
The StackOverflow topic : http://stackoverflow.com/questions/28857860/classnotfoundexception-didnt-find-class-android-os-persistablebundle-otto-an |
So How can I manage it? |
It's said in the Stackoverflow Topic. |
But what If I need to use onSaveInstanceState ? so how can I manage the save on my actual activity state? |
Maybe you mean this function : Activity : protected void onSaveInstanceState (Bundle outState) Otherwise, you need to check if your on API 21 and over or not. |
Opa, yeah! thanks!! |
I fix it! @CorentinPacaud @xsveda is right! change function to Activity.onCreate(Bundle) or onSaveInstanceState (Bundle outState) . it's work fine. :) |
I've seen this issue. But I just don't get - we get this crash on all pre21 API devices with our app - during
OttoBusProvider.getInstance().register(this);
in onPause().Looking at the number of forks and start I assume that lots of people and teams are using this library - how comes they don't get the crash?
Is there any possible workaround here?
P. S.: before we tried EventBus lib from greenrobot - same error, identical stack, only package name differs.
The text was updated successfully, but these errors were encountered: