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

前端 未结 9 1314
感动是毒
感动是毒 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:26

    I got the same error. I resolved it by :

    1) Removing unnecessary packages in the build.gralde.

    2) Disabling the Firebase plugin

    3) Upgrading the build tool to the latest

    0 讨论(0)
  • 2021-02-14 06:32

    This works great which you add multidex support in manifest, when ever i encounter problem i got it fixed this way more over 64K.

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.myapp">
        <application
                android:name="android.support.multidex.MultiDexApplication" >
            ...
        </application>
    </manifest>
    
    0 讨论(0)
  • 2021-02-14 06:35

    Add following line to Manifest.xml

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

    Add this sn App level build.gradle file

     defaultConfig {
        multiDexEnabled true
    } 
          ......
    
    dependencies {
    compile 'com.android.support:multidex:1.0.1'
    }
    
    0 讨论(0)
  • 2021-02-14 06:41

    It seems you have a problem with Over 64K Methods and then tried to resolved it with multiDexEnabled true in build.gradle (app module). But you need to add more than:

    1. add: compile 'com.android.support:multidex:1.0.0' in dependencies of build.gradle

    2. Extends your Application class to MultiDexApplication. and add MultiDex.install(this); in onCreated method of Application class.

    your issue should be resolved

    refer link: https://developer.android.com/studio/build/multidex.html

    0 讨论(0)
  • 2021-02-14 06:41

    A simple solution that works for me after trying all of these solution is by deleting outputs folder under project\app\build\ and rebuilding project will let it to running state.

    0 讨论(0)
  • 2021-02-14 06:42

    I got the same error and resolved it using:

    1. Clean/Rebuild your Project.
    2. Restart Android Studio.
    3. Update all SDK tools and Android Studio.
    4. Clear Cache and Clear Data on Device.
    0 讨论(0)
提交回复
热议问题