I am trying to use this plugin, but I get this error on "tns run android", any idea? any clue is appreciated.
Failed to apply plugin [id 'com.google.gms.google-services']
For input string: "+"
Thank you!
Do you have other plugins that use com.google.gms.google-services as well?
I dont think so, I was using google maps before but I removed it, you think there are some remaining of it? I removed the platform and added it back in and still the issue.
These are my current plugins:

Thanks
Can you search the entire project for "com.google.gms.google-services:+"? or "com.google.gms:google-services:+" perhaps.
Yes, found those, in the build.gradle file per your instructions.
Your demo app works, so I am going to start removing plugins and try to isolate the problem, I will check why one app works and the other one does not.... weird.
The problem was that I had this other plugin installed https://github.com/NativeScript/push-plugin, and also my gradle had this other dependency compile 'com.google.android.gms:play-services-gcm:+' needed by the same plugin (that I am trying to replace with this one btw)
I add and remove Platforms to resolved issues a lot, it is not easy to automate the modification of the build.gradle right?
Thanks!
Nah it's not.. it would be possible but may be a little brittle. Think automatically running a node script upon install which add the required bits to the file. No rocket science of course..
cool!
Thanks
And what should I do when I want to actually use a google maps plugin alongside firebase, and I get the same error as described above. tns platform add/remove android is not helping.
@rossbg that's documented here
@Daxito I am getting below error Please help
A problem occurred evaluating root project 'android'.
Failed to apply plugin [id 'com.google.gms.google-services']
For input string: "8+"
I placed classpath 'com.google.gms:google-services:3.0.0' under dependencies in buildscript in build.gradle
compile "com.google.android.gms:play-services-gcm:9.8+" in dependencies
apply plugin: 'com.google.gms.google-services' as last line in build.gradle
Every time I change + sign to 9.8.0 or 7.5.0 in com.google.android.gms:play-services-gcm:9.8.0 but after doing ionic build android it become com.google.android.gms:play-services-gcm:9.8+
The gradle dependency auto update to 9.8+ everytime. Kindly help. Struggling long time
@ManiSJ I don't know if the ionic build is modifying that part, maybe you should also check your gradle file under the App_Resources/Android?
@Daxito Build was successful after removing classpath 'com.google.gms:google-services:3.0.0' and adding classpath 'com.google.gms:google-services:1.3.0-beta1'
I think there is one more change needs to be done. Took me some time to figure this out.
This file should be changed (platforms/android/configurations/nativescript-admob/include.gradle)
From:
dependencies {
compile "com.google.android.gms:play-services-ads:+"
}
To:
dependencies {
compile "com.google.android.gms:play-services-ads:$googlePlayServicesVersion"
}
And of course this should be applied:
https://github.com/EddyVerbruggen/nativescript-plugin-firebase#includegradle-failed-to-apply-plugin--for-input-string-
I am getting the same error.
Error: /home/abdullaku/Desktop/kabinger_Cordova/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
Where:
Script '/home/abdullaku/Desktop/kabinger_Cordova/platforms/android/phonegap-plugin-push/kabinger-push.gradle' line: 38
What went wrong:
A problem occurred evaluating root project 'android'.
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
For input string: "+"
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
In my Project added push plugin and google analytics plugin..i tried all the above solution but that not working,
Same here, not fixed yet !!
It seems that two cordova plugins are using the same library, that's why it throws the error, I don't know how it can be fixed!
I'm trying to use ad-mob with this plugin and this is a problem. I can fix it by manually updating the include.gradle file but this doesn't work for a release build as this file is rebuilt.
I have the same exact issue as @abducbk . Cordova 7.0.1. phonegap-push-plugin 2.0.0. Will hack away and report if am able to fix it.
@abducbk @amit777 @HamzaLJ THis is not a Cordova plugin.
I've been able to fix it by following the answer in this Stackoverflow question: https://stackoverflow.com/questions/39280469/cordova-fcm-build-error-failed-to-apply-plugin-id-com-google-gms-google-ser
Thank you @tobiasmuecksch It solved my issue too.
@EddyVerbruggen I had used "11.2.+" only as you have suggested in ReadMe. But until I change it to "11.2.2" I was still getting same issue (side note, I'm using Google Maps plugin in my Project).
Mostly this error occurs due to while adding google-maps and push-notification plugin in a project.I don't think the problem is coming from this plugin. It's probably another plugin that is using the + to include dependencies. I hope this link helpful to you https://techionichybride.blogspot.co.id/2017/10/failed-to-apply-plugin-id.html
Hello,
I am creating application in NativeScript and i am using
"nativescript-google-maps-sdk": "2.5.0", and "nativescript-plugin-firebase": "5.1.7" in my project and both uses google services.
I am getting the same error after installing firebase plugin in my project.
Error is -
Failed to apply plugin [id 'com.google.gms.google-services']
For input string: "+"
Can anyone please help me to solve this?
Its recommended to use 11.8.0 (from readme), same solved issues with my apps earlier.
I have just added admob to my firebase application. Now I am getting this error.
...node_modules/nativescript-plugin-firebase/platforms/android/include.gradle' line: 73
Following the instructions, I have tried adding to the app.gradle
project.ext {
googlePlayServicesVersion = "11.8.0"
}
Can anyone please help me resolve the issue?
Resolved own issue.
https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/ADMOB.md
What about the nativescript-admob plugin?
There's currently no functional difference between the AdMob features in the Firebase plugin and nativescript-admob.
The main advantage of using the version in the Firebase plugin is to avoid a gradle build conflict in the Android build you may encounter when including both plugins in your app.
Most helpful comment
I've been able to fix it by following the answer in this Stackoverflow question: https://stackoverflow.com/questions/39280469/cordova-fcm-build-error-failed-to-apply-plugin-id-com-google-gms-google-ser