Failed to resolve: com.google.firebase:firebase-core:15.0.0

后端 未结 6 2215
庸人自扰
庸人自扰 2020-12-31 01:50

I have a strange issue when integrate firebase:

\"enter

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 02:27

    Step 1 :

    In your root build.gradle file add the repo:

    allprojects {
      repositories {
       google()
       maven { url "https://maven.google.com" }
     }
    }
    

    Now Sync Gradle. This is the directory that contains the repos of Firebase.

    Step 2 :(if step 1 doesn't works)

    If the Step 1 doesn't works, then it should be because you are using the Gradle in offline mode. If your gradle is set to offline, android studio searches for the cached copies of the dependencies that you want to update and throws an error since it hasn't downloaded the file before.

    Go to Settings >> Build, Execution, Deployment >> Gradle.
    In the Global Gradle Settings section, disable Offline mode.

    Now Sync Gradle again.

提交回复
热议问题