Error:(27, 13) Failed to resolve: com.google.firebase:firebase-core:9.8.0

前端 未结 3 1804
长情又很酷
长情又很酷 2020-12-15 08:13

I\'m trying to use Firebase in my app.

After adding three lines to Gradle, I get this error:

Error:(27, 13) Failed to resolve: com.google.fir

相关标签:
3条回答
  • 2020-12-15 08:36

    As described here, add this:

    dependencies {
            // ...
            classpath 'com.google.gms:google-services:3.0.0'
        }
    

    In your project level gradle file and this one in the app level gradle file:

    dependencies {
      compile 'com.google.firebase:firebase-core:9.8.0'
    }
    apply plugin: 'com.google.gms.google-services'
    
    0 讨论(0)
  • 2020-12-15 08:51

    I guess, you need to update google repository. Try running SDK manager and check if there is any update.

    Look at the comment in sample here

    dependencies {
      // ...
      compile 'com.google.firebase:firebase-core:9.8.0'
    
      // Getting a "Could not find" error? Make sure you have
      // the latest Google Repository in the Android SDK manager
    }
    

    Getting a "Could not find" error? Make sure you have the latest Google Repository in the Android SDK manager

    Go to SDK Manager -> Extras and check of updates.

    0 讨论(0)
  • 2020-12-15 08:57

    Make sure the Google Repository and its related repostories has been updated to the latest version. Check by going to the SDK Manager -> Extras Section.

    Firebase Doc Link

    0 讨论(0)
提交回复
热议问题