Closed tominou closed 7 years ago
I am facing same issue. Any solution?
Duplicate of #1718
I am also facing the same error as: BUILD FAILED
Total time: 46.453 secs FAILURE: Build failed with an exception.
Where: Script 'C:\Users\XXXX\myApp\platforms\android\phonegap-plugin-push\starter-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. Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
Where: Script 'C:\Users\XXXXX\myApp\platforms\android\phonegap-plugin-push\starter-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.
[ERROR] An error occurred while running cordova build android (exit code 1).
@smadupathi , @shahdeep1989 , @tobmaster Hi all I have resolved this issue. please follow following points
cordova.system.library.9=com.google.firebase:firebase-messaging:11.+
and at the end , create a google-services.json from your fiirebase app console. download this google-services.json and paste into your platforms\android and re build your app again. it will work prefect thank you.
Two days ago i did it, but today my project.properties back put the + in these services again...
@sohandhaindwal thanks, you saved me
Hi. I am having the same issue. Here is my from platforms\android\project.properties files
# Project target. target=android-26 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.1=com.android.support:support-v13:26. cordova.system.library.2=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.3=com.google.firebase:firebase-messaging:11.0.1 cordova.gradle.include.1=phonegap-plugin-push/app-push.gradle cordova.gradle.include.2=cordova-plugin-firebase/app-build.gradle cordova.system.library.4=com.google.gms:google-services: cordova.system.library.5=com.google.android.gms:play-services-tagmanager: cordova.system.library.6=com.google.firebase:firebase-core: cordova.system.library.7=com.google.firebase:firebase-messaging: cordova.system.library.8=com.google.firebase:firebase-crash: cordova.system.library.9=com.google.firebase:firebase-config: cordova.system.library.10=com.google.firebase:firebase-messaging:11.+
I just solved it, it is all about version. Take a look at my project.properties. It works perfectly now
target=android-26 android.library.reference.1=CordovaLib cordova.gradle.include.1=com-sarriaroman-photoviewer/app-photoviewer.gradle cordova.system.library.1=com.android.support:support-v4:24.1.1+ cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.+ cordova.system.library.3=com.google.android.gms:play-services-maps:11.8.0 cordova.system.library.4=com.google.android.gms:play-services-location:11.8.0 cordova.system.library.5=com.android.support:support-v4:24.1.1+ cordova.gradle.include.2=cordova-support-google-services/app-build.gradle cordova.system.library.6=com.google.firebase:firebase-core:11.8.0 cordova.system.library.7=com.google.firebase:firebase-messaging:11.8.0 cordova.gradle.include.3=cordova-plugin-fcm/app-FCMPlugin.gradle
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
The solution was to set all to the libraries to the same version as stated by @gls-labs
Set them all to 11.8.0 in platform/android/project.properties then it will build correctly.
Thank you all ^^
not working
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] For input string: "+"
Please share your platform/android/project.properties
target=android-26 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.1=com.android.support:customtabs:23.3.0 cordova.gradle.include.1=cordova-plugin-browsertab/app-BrowserTab.gradle cordova.gradle.include.2=cordova-plugin-buildinfo/app-BuildInfo.gradle cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.+ cordova.gradle.include.3=cordova-plugin-firebase/app-build.gradle cordova.system.library.3=com.google.gms:google-services:+ cordova.system.library.4=com.google.android.gms:play-services-tagmanager:+ cordova.system.library.5=com.google.firebase:firebase-core:+ cordova.system.library.6=com.google.firebase:firebase-messaging:+ cordova.system.library.7=com.google.firebase:firebase-crash:+ cordova.system.library.8=com.google.firebase:firebase-config:+ cordova.system.library.9=com.google.android.gms:play-services-auth:+ cordova.system.library.10=com.google.android.gms:play-services-identity:+ cordova.system.library.11=com.android.support:support-v13:26.+ cordova.system.library.12=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.13=com.google.firebase:firebase-messaging:11.6.2 cordova.gradle.include.4=phonegap-plugin-push/app-push.gradle @tominou
Of course it is not working because you didn't change anything, try this one:
target=android-26 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.1=com.android.support:customtabs:23.3.0 cordova.gradle.include.1=cordova-plugin-browsertab/app-BrowserTab.gradle cordova.gradle.include.2=cordova-plugin-buildinfo/app-BuildInfo.gradle cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.+ cordova.gradle.include.3=cordova-plugin-firebase/app-build.gradle cordova.system.library.3=com.google.gms:google-services:+ cordova.system.library.4=com.google.android.gms:play-services-tagmanager:11.8.0 cordova.system.library.5=com.google.firebase:firebase-core:11.8.0 cordova.system.library.6=com.google.firebase:firebase-messaging:11.8.0 cordova.system.library.7=com.google.firebase:firebase-crash:11.8.0 cordova.system.library.8=com.google.firebase:firebase-config:11.8.0 cordova.system.library.9=com.google.android.gms:play-services-auth:11.8.0 cordova.system.library.10=com.google.android.gms:play-services-identity:11.8.0 cordova.system.library.11=com.android.support:support-v13:26.+ cordova.system.library.12=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.13=com.google.firebase:firebase-messaging:11.8.0 cordova.gradle.include.4=phonegap-plugin-push/app-push.gradle
BU�LD FAILED in 0s (node:8636) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
execution failed for task :"app:processDebugResources" error
unhandled promise rejections are deprecated.In the future, promise rejections that are not handler will terminate the node.js process with a non-zero exit code
i tried to change the version number, still the error exist target=android-26 android.library.reference.1=CordovaLib cordova.system.library.1=com.facebook.android:facebook-android-sdk:4.+ cordova.system.library.2=com.google.android.gms:play-services-location:11.8.0 cordova.system.library.3=com.google.android.gms:play-services-auth:11.8.0 cordova.system.library.4=com.google.android.gms:play-services-identity:11.8.0 cordova.system.library.5=com.android.support:support-v4:24.1.1+ cordova.gradle.include.1=phonegap-plugin-barcodescanner/fcmtest-barcodescanner.gradle cordova.system.library.6=com.android.support:support-v4:24.1.1+ cordova.system.library.7=com.android.support:support-v4:24.1.1+ cordova.system.library.8=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.9=com.google.firebase:firebase-messaging:11.8.0 cordova.gradle.include.2=phonegap-plugin-push/fcmtest-push.gradle
tanks bro geass619
Can anyone help me out ?
android.library.reference.1=CordovaLib cordova.gradle.include.1=cordova-android-play-services-gradle-release/BkAssistant-cordova-android-play-services-gradle-release.gradle cordova.system.library.1=com.squareup.okhttp3:okhttp-urlconnection:3.10.0 cordova.gradle.include.2=cordova-plugin-badge/starter-badge.gradle cordova.system.library.2=com.android.support:support-v4:24.1.1+ cordova.gradle.include.3=cordova-plugin-firebase/starter-build.gradle cordova.system.library.3=com.google.gms:google-services:+ cordova.system.library.4=com.google.android.gms:play-services-tagmanager:11.8.0 cordova.system.library.5=com.google.firebase:firebase-core:11.8.0 cordova.system.library.6=com.google.firebase:firebase-messaging:11.8.0 cordova.system.library.7=com.google.firebase:firebase-crash:11.8.0 cordova.system.library.8=com.google.firebase:firebase-config:11.8.0 cordova.system.library.9=com.android.support:support-v4:26.+ cordova.gradle.include.4=cordova-plugin-local-notification/starter-localnotification.gradle cordova.system.library.10=com.onesignal:OneSignal:3.8.3 cordova.gradle.include.5=onesignal-cordova-plugin/starter-build-extras-onesignal.gradle cordova.system.library.11=com.facebook.android:facebook-android-sdk:4.+ cordova.system.library.12=com.google.android.gms:play-services-auth:11.8.0 cordova.system.library.13=com.google.android.gms:play-services-identity:11.8.0 cordova.system.library.14=com.android.support:support-v4:26.+ cordova.system.library.15=com.android.support:appcompat-v7:26.+ cordova.gradle.include.6=cordova-plugin-fcm/BkAssistant-FCMPlugin.gradle
help me
FAILURE: Build failed with an exception.
Where: Script '/Users/kalyan/Desktop/untitled folder/livbimmobile_android/platforms/android/cordova-support-google-services/qa-build.gradle' line: 16
What went wrong: A problem occurred evaluating project ':app'.
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.
Get more help at https://help.gradle.org
BUILD FAILED in 4s (node:8312) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /Users/kalyan/Desktop/untitled folder/livbimmobile_android/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
Where: Script '/Users/kalyan/Desktop/untitled folder/livbimmobile_android/platforms/android/cordova-support-google-services/qa-build.gradle' line: 16
What went wrong: A problem occurred evaluating project ':app'.
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin'] For input string: "+"
target=android-27 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.1=com.android.support:support-v13:27.+ cordova.system.library.2=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.3=com.google.firebase:firebase-messaging:11.6.2 cordova.gradle.include.1=phonegap-plugin-push/qa-push.gradle cordova.system.library.4=com.android.support:support-v4:24.1.1+ cordova.gradle.include.2=cordova-support-google-services/qa-build.gradle cordova.system.library.5=com.android.support:support-v4:26.+ cordova.system.library.6=com.android.support:appcompat-v7:26.+ cordova.gradle.include.3=cordova-plugin-firebase/qa-build.gradle cordova.system.library.7=com.google.gms:google-services:+ cordova.system.library.8=com.google.android.gms:play-services-tagmanager:+ cordova.system.library.9=com.google.firebase:firebase-core:+ cordova.system.library.10=com.google.firebase:firebase-messaging:+ cordova.system.library.11=com.google.firebase:firebase-crash:+ cordova.system.library.12=com.google.firebase:firebase-config:+
@tominou @geass619 @gls-labs
Any solution?? The Issue still persists.
Ansroid push gradle code: `import java.util.regex.Pattern
def doExtractStringFromManifest(name) { def manifestFile = file("AndroidManifest.xml") if (!manifestFile.exists()) { manifestFile = file("src/main/AndroidManifest.xml") } def pattern = Pattern.compile(name + "=\"(.*?)\"") def matcher = pattern.matcher(manifestFile.getText()) matcher.find() return matcher.group(1) }
android { defaultConfig { multiDexEnabled true applicationId = doExtractStringFromManifest("package") } }
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 = { // line35 apply plugin: com.google.gms.googleservices.GoogleServicesPlugin //line 35 } `
Same for me :(
The same issue here Please help me out I've tried everything
# Project target. target=android-27 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.1=com.android.support:customtabs:23.3.0 cordova.gradle.include.1=cordova-plugin-browsertab/mobile-BrowserTab.gradle cordova.gradle.include.2=cordova-plugin-buildinfo/mobile-BuildInfo.gradle cordova.system.library.2=com.android.support:support-v4:24.1.1+ cordova.gradle.include.3=cordova-plugin-firebase/mobile-build.gradle cordova.system.library.3=com.google.gms:google-services:11.6.2 cordova.system.library.4=com.google.android.gms:play-services-tagmanager:11.6.2 cordova.system.library.5=com.google.firebase:firebase-core:11.6.2 cordova.system.library.6=com.google.firebase:firebase-messaging:11.6.2 cordova.system.library.7=com.google.firebase:firebase-crash:11.6.2 cordova.system.library.8=com.google.firebase:firebase-config:11.6.2 cordova.gradle.include.4=cordova-support-google-services/mobile-build.gradle cordova.gradle.include.5=phonegap-plugin-multidex/mobile-multidex.gradle cordova.system.library.9=com.android.support:support-v13:27.+ cordova.system.library.10=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.11=com.google.firebase:firebase-messaging:11.6.2
@hectorggp it's probably:
cordova.system.library.2=com.android.support:support-v4:24.1.1+
cordova.system.library.9=com.android.support:support-v13:27.+
conflicting with each other. They should both match.
@macdonst does't works
I have
cordova.system.library.2=com.android.support:support-v4:27.1.1 cordova.system.library.9=com.android.support:support-v13:27.1.1
I have:
cordova --version 8.0.0 cordova platform version android 7.1.0 cordova plugin versoin|grep phonegap-plugin-push phonegap-plugin-push 2.2.3 "PushPlugin" npm --version 5.6.0 node --version v8.9.4 ionic --version 3.20.0
That was a conflict with cordova-plugin-firebase. Sorry, I'm missed
Yes there is a plugin conflict, I solved it by removing the firebase plugin, then removing the platform, re-adding the platform and then re-adding the firebase plugin and making the version of google services and firebase same in project properties.
I appreciate your help, thank you very much
The same issue is happening with me
Here is my project.propreties file. I changed everything to 11.0.4 version, but still not working.
target=android-27 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.1=com.google.android.gms:play-services-base:11.0.4 cordova.system.library.2=com.google.android.gms:play-services-ads:11.0.4 cordova.system.library.3=com.android.support:support-v4:24.1.1+ cordova.gradle.include.1=cordova-support-google-services/mobile-build.gradle cordova.gradle.include.2=phonegap-plugin-multidex/mobile-multidex.gradle cordova.system.library.4=com.android.support:support-v13:27.+ cordova.system.library.5=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.6=com.google.firebase:firebase-messaging:11.6.2 cordova.gradle.include.3=cordova-plugin-firebase/mobile-build.gradle cordova.system.library.7=com.google.gms:google-services:11.0.4 cordova.system.library.8=com.google.android.gms:play-services-tagmanager:11.0.4 cordova.system.library.9=com.google.firebase:firebase-core:11.0.4 cordova.system.library.10=com.google.firebase:firebase-messaging:11.0.4 cordova.system.library.11=com.google.firebase:firebase-crash:11.0.4 cordova.system.library.12=com.google.firebase:firebase-config:11.0.4 cordova.system.library.13=com.google.firebase:firebase-perf:11.0.4 ` I add 3 plugin in my Ionic Project. 1 - phonegap-plugin-push (works fine) 2 - cordova-plugin-admob-free (works fine) 3 - cordova-plugin-firebase (i got the error)
When i remove the cordova-plugin-firebase, the build is OK. But when i add the plugin i got the error again. Someone can help me?
This thread has been automatically locked.
cordova --version 7.0.1 cordova platform version android 6.2.3 cordova plugin version | grep phonegap-plugin-push 2.0.0-rc5
Hi,
Since upgrading cordova, cordova-android and all my plugins, my project doesn't build anymore. If i remove phonegap-plugin-push, build is working fine. I tried removing android platform, but still got the exact same error.
Here is the error i get:
_Error: /home/tom/Development/cordova/xxx/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
Where: Script '/home/tom/Development/cordova/xxx/platforms/android/phonegap-plugin-push/tt-push.gradle' line: 38
What went wrong: A problem occurred evaluating root project 'android'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output._
And here is the tt-push.gradle file:
_def doExtractStringFromManifest(name) { def manifestFile = file(android.sourceSets.main.manifest.srcFile) def pattern = Pattern.compile(name + "=\"(.*?)\"") def matcher = pattern.matcher(manifestFile.getText()) matcher.find() return matcher.group(1) }
android { sourceSets { main { manifest.srcFile 'AndroidManifest.xml' } }
}
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 }_
Thank you by advance ^^