Android 10 Activity Oncreate Crash
The splash activity of my app works well on all devices except on an Android 10 device that I have just recently updated. Here is my code: public class SplashScreen extends AppCom
Solution 1:
As per this issue, this will occur when using lifecycle-runtime:2.2.0
(usually through a transitive dependency on Fragment or AppCompat) and lifecycle-process:2.1.0
(usually through a transitive dependency on lifecycle-extensions
).
There are a number of work arounds available in the bug:
You do any one of the following:
- Add an explicit dependency on
lifecycle-process:2.2.0-alpha05
to pull in the new version that is compatible withlifecycle-runtime:2.2.0-alpha05
- Upgrade your
lifecycle:extensions
dependency to2.2.0-alpha05
so thatlifecycle-process
is upgraded- Remove the
lifecycle:extensions
dependency entirely and use only the lifecycle libraries you need (for example, uselifecycle-viewmodel-ktx
if you want ViewModels) so that you don't pull inlifecycle-process
at all
Or, since the compatibility issue has been fixed in a later release, upgrade to a later version of Fragments (version 1.2.0-beta01
or higher) or Lifecycle 2.2.0-beta01
or higher if you directly depend on Lifecycle.
Post a Comment for "Android 10 Activity Oncreate Crash"