Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList

参考:https://stackoverflow.com/questions/55177386/unable-to-get-provider-androidx-lifecycle-processlifecycleownerinitializr

1.app.gradle文件添加
 

defaultConfig {
        ...
        multiDexEnabled true
    }

2.app.gradle引用

implementation "com.android.support:multidex:1.0.3"

3. 如果你原来有继承Application的实现类,现在改成 extends MultiDexApplication;

    如果没有,在AndroidMainfest.xml文件,application标签添加

android:name="android.support.multidex.MultiDexApplication" 

 

 

你可能感兴趣的:(Android)