Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be used

I am integrating fire-base to my existing project used these libs

   compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'
compile 'com.google.android.gms:play-services:9.0.2'

Dependencies

    dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'
    classpath 'com.google.gms:google-services:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

I am getting this error

Error:Execution failed for task ':app:processDebugGoogleServices'.

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

Not able to figure out what is happening ??

These are my play services verison enter image description here

like image 522
Lokesh Tiwari Avatar asked Jun 13 '16 12:06

Lokesh Tiwari


People also ask

Where to add google-services json in Android studio?

The google-services. json file is generally placed in the app/ directory (at the root of the Android Studio app module).

What is the use of Google-services json?

The google-services. json file created in this doc is used within your app to connect to firebase and facilitate Android Push Notifications and is normally labelled google-services. json.


1 Answers

I have added this line at last in build.gradle:(Module: app)

 apply plugin: 'com.google.gms.google-services'

and it started working I don't know what is concept behind this?
but it is working

like image 90
Lokesh Tiwari Avatar answered Oct 23 '22 19:10

Lokesh Tiwari