Getting Exception java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions after updating to the new firebase

后端 未结 15 1805
渐次进展
渐次进展 2020-11-22 09:56

I have updated my application to the new firebase using the this and now when i compile my project i get the following exception.

Here is my logcat:

15条回答
  •  天命终不由人
    2020-11-22 10:46

    Using latest Google Play services but was not working. For me this procedure is working:

    1. Updated my Application class:

      public class App extends Application {
        @Override
        protected void attachBaseContext(Context base) {
          super.attachBaseContext(base);
          MultiDex.install(this);
       }
      }
      
    2. Updated build.gradle file:

      defaultConfig {
          ...
          multiDexEnabled true
      }
      
    3. Included dependencies:

      dependencies {
        compile 'com.android.support:multidex:1.0.0'
      }
      

提交回复
热议问题