Hi, I am to explain about a most occurring error while putting google maps and push-notification plugin in a project. So finally found out the solution how to resolve this error.
Failed to apply plugin [id 'com.google.gms.google-services']
For input striing: "+"
Solution:
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.
Go To:
Script '/Users/giladkaplan1/Projects/Production/EPAActive/platforms/android/phonegap- plugin-push/XXXXXX-push.gradle' .
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:+'
classpath 'com.google.gms:google-services:3.0.0'
}
}
// apply plugin: 'com.google.gms.google-services'
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file
ext.postBuildExtras = {
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
}
In this place classpath 'com.android.tools.build:gradle:+' here all ready having '+' in gradle. Then now got to platform/android/project.properties. Here also you found '+' in play-service-maps and play-service-location.
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-25
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.google.android.gms:play-services-maps:+
cordova.system.library.3=com.google.android.gms:play-services-location:+
cordova.system.library.4=com.android.support:support-v13:25.1.0
cordova.system.library.5=me.leolin:ShortcutBadger:1.1.17@aar
cordova.system.library.6=com.google.firebase:firebase-messaging:11.0.1
cordova.gradle.include.1=phonegap-plugin-push/education-push.gradle
android.library.reference.1=CordovaLib
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-25
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.google.android.gms:play-services-maps:+
cordova.system.library.3=com.google.android.gms:play-services-location:+
cordova.system.library.4=com.android.support:support-v13:25.1.0
cordova.system.library.5=me.leolin:ShortcutBadger:1.1.17@aar
cordova.system.library.6=com.google.firebase:firebase-messaging:11.0.1
cordova.gradle.include.1=phonegap-plugin-push/education-push.gradle
android.library.reference.1=CordovaLib
Here play-service-maps and play-service-location also having '+'. I already told there is no problem in plugin. So push-notifcation.gradle and project.properties having the '+' symbol so the reason they are confided. Now we want to add 11.0.1 instead of '+' in project.properties. Here 11.0.1 mentioned as a firebase version. So need to put version number instead of '+' in play-service-maps and play-service-location. You want to replace like this.
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-25
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.google.android.gms:play-services-maps:11.0.1
cordova.system.library.3=com.google.android.gms:play-services-location:11.0.1
cordova.system.library.4=com.android.support:support-v13:25.1.0
cordova.system.library.5=me.leolin:ShortcutBadger:1.1.17@aar
cordova.system.library.6=com.google.firebase:firebase-messaging:11.0.1
cordova.gradle.include.1=phonegap-plugin-push/education-push.gradle
android.library.reference.1=CordovaLib
By doing this my problem solved....
Failed to apply plugin [id 'com.google.gms.google-services'] For input string: "+" in ionic?
Reviewed by Sudhan
on
October 27, 2017
Rating:
Not working
ReplyDelete