Nativescript-plugin-firebase: Found com.google.android.gms:play-services-base:9.4.0, but version 9.0.0 is needed for the google-services plugin.

Created on 13 Sep 2016  路  13Comments  路  Source: EddyVerbruggen/nativescript-plugin-firebase

Need push notification in my app.
Followed the steps to install "nativescript-plugin-firebase":"^3.6.1" .
Did following configuration while installing the plugin

NativeScript Firebase Plugin Installation
prompt: Are you using iOS (y/n): (y) y
prompt: Are you using Android (y/n): (y) y
prompt: Are you using Firebase RemoteConfig (y/n): (n) n
prompt: Are you using Firebase Messaging (y/n): (n) y
prompt: Are you using Firebase Storage (y/n): (n) n
prompt: Are you using Firebase Facebook Authentication (y/n): (n) n
prompt: Are you using Firebase Google Authentication (y/n): (n) n

Attached are gradle.build and google-services.json.

And using Andular2+NS app on android emulator with version 4.4.4.

After build of the app it gives following error "Found com.google.android.gms:play-services-base:9.4.0, but version 9.0.0 is needed for the google-services plugin."

Some other exceptions an warnings:

"What went wrong:
**Execution failed for task ':processF0F1DebugGoogleServices'.

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."**

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.

Adding Android SDK Manager versions as well.

image

Plugin issue.zip

Most helpful comment

You have apply plugin: "com.google.gms.google-services" at line 34 of build.gradle. Can you move it to the very bottom of the file and try again?

All 13 comments

You have apply plugin: "com.google.gms.google-services" at line 34 of build.gradle. Can you move it to the very bottom of the file and try again?

@EddyVerbruggen No same issue after moving to very bottom.

Can I get your entire project perhaps? In such a way that I can reproduce the problem.

Well Eddy , i am using a sample project, i can share that, its just like hello World, with only "nativescript-plugin-firebase" plugin. I will share that.

Hi @EddyVerbruggen Here my sample app
Push App Project.zip

@EddyVerbruggen added the sample app here https://github.com/piyushgodara/Push-app

Can you please check?

Same problem here but with 9.2.0 instead of 9.0.0 (if I remember it correctly). haven't been able to fix this yet :(

Found com.google.android.gms:play-services-base:9.4.0, but version 9.2.0 is needed for the google-services plugin.

when trying to build with:

@EddyVerbruggen what packages have you installed for your working setup?

@t-moe I have the exact same config.

@piyushgodara I need the platforms/android folder as well since that's where you need to add the additional configuration.

What I understand is that if you place apply plugin: "com.google.gms.google-services" at the very bottom of platforms/android/build.gradle it will sort out any version conflicts for you.

oh, I had a app.gradle file where I had something like:
compile "com.google.firebase:firebase-messaging:9.2.0" (in order to avoid having to modify include.gradle)

Removed that line, and now it works again :sweat_smile:

@EddyVerbruggen Updated platforms/android folder in the repository. Please help :)

@EddyVerbruggen did you got change to figure out this one ??

Working with latest version :+1:

Was this page helpful?
0 / 5 - 0 ratings