RuntimeException:ClassNotFoundException android.arch.lifecycle.ProcessLifecycleOwnerInitializer
This ended up being a multdex issue. I followed the docs here -> https://developer.android.com/studio/build/multidex.html#mdex-gradle and it works great now!
Gradle:
implementation 'com.android.support:multidex:1.0.3'
App.java:
public class App extends Application implements Application.ActivityLifecycleCallbacks {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
All I had to do was add the following to my proguard-rules.pro
file:
-keep class android.arch.lifecycle.** {*;}
In my case, Somehow android architecture lifecycle files getting omitted with Android bundle on Pie(Android9). So what I did was added keep statement for the same in proguard-rules.pro
For AndroidX :
-keep class androidx.lifecycle.** {*;}
For Support :
-keep class android.arch.lifecycle.** {*;}