Unable to update the Firebase dependency(com.google.firebase)

后端 未结 5 722
灰色年华
灰色年华 2020-12-20 15:36

I have Added Firebase to android app for push notification. I have updated build.gradle before i have used. Its working fine.

 compile \'com.google.firebase:         


        
相关标签:
5条回答
  • 2020-12-20 16:20

    If you read documentation they are indicating you update your latest Google Repository in the Android SDK manager

    So just go to Android SDK Manager and install the latest version of below two libraries

    1-Google Play Services

    2-Google Repository

    Check the image from documentation:

    0 讨论(0)
  • 2020-12-20 16:27

    You have to update your Google Play Services and Google Repository from the Standalone SDK Manager.

    Edit: As of the latest version of Android Studio the Standalone SDK Manager is removed. You must go to the SDK Tools tab.

    First off, open Android Studio and click this icon at the top toolbar:

    Then, when the dialog launches, click "Launch Standalone SDK Manager" at the bottom left of the dialog:

    To make sure nothing other than what we want gets updated/installed, click "Deselect All":

    When the Standalone SDK Manager window opens, look for "Extras" and collapse it. You should see "Google Play Services" and "Google Repository" and on the right you should see "Update Available: {something}". Select these to items and click "Install".

    When they're done installing, the error will go away.

    0 讨论(0)
  • 2020-12-20 16:27

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

    To reseolved the problem;

    • Open SDK Manager and update the SDK Tools for latest especially Google APIs under Android 7.0(API 24)
    0 讨论(0)
  • 2020-12-20 16:39

    May be you are not giving the right repo.

    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }
    0 讨论(0)
  • 2020-12-20 16:42

    Add the google-services plugin

    In build.gradle file, to include the google-services plugin:

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

    Then, in your module Gradle file (usually the app/build.gradle), add the apply plugin line at the bottom of the file to enable the Gradle plugin:

    apply plugin: 'com.android.application'
    
    android {
    // ...
     }
    
    dependencies {
     // ...
    compile 'com.google.firebase:firebase-core:10.0.1'
    
    // Getting a "Could not find" error? Make sure you have
    // the latest Google Repository in the Android SDK manager
     }
    
    // ADD THIS AT THE BOTTOM
    apply plugin: 'com.google.gms.google-services'
    

    More details refer Firebase setup

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