Didn't find class “com.google.firebase.provider.FirebaseInitProvider”

前端 未结 9 1343
感动是毒
感动是毒 2021-02-14 06:05

Before, my program run well. But When I just updated my Android studio to the latest version (2.2 built on 15-sept-16), I am having the following error. When I built it, it says

9条回答
  •  误落风尘
    2021-02-14 06:46

    In app module build.gradle

    android {
       ...
       defaultConfig {
          multiDexEnabled true
          ...
       }
    }
    
    dependencies {
      // add dependency 
      compile 'com.android.support:multidex:1.0.1'
    }
    

    Change name in AndroidManifest.xml

    
    
     // ...
    
    

    Crate a MyApplication.java file

    public class MyApplication extends Application {
    
        @Override
        protected void attachBaseContext(Context base) {
            super.attachBaseContext(base);
            MultiDex.install(this);
        }
    
    }
    

    For MORE details can see this link.

提交回复
热议问题