Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 139 forks source link

Can't build with PGB for Android #316

Closed andersborgabiro closed 5 years ago

andersborgabiro commented 5 years ago

Using PGB, cli-8.1.1 (Android: 7.0.0) and pushwoosh-pgb-plugin via NPM I can build for iOS but not for Android.

I get the following error when the plugin is included:

:app:preDebugBuild
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh/5.14.4/pushwoosh-5.14.4.pom
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-badge/5.14.4/pushwoosh-badge-5.14.4.pom
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-inbox/5.14.4/pushwoosh-inbox-5.14.4.pom
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-amazon/5.14.4/pushwoosh-amazon-5.14.4.pom
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-inbox-ui/5.14.4/pushwoosh-inbox-ui-5.14.4.pom
Download https://maven.google.com/com/android/support/constraint/constraint-layout/maven-metadata.xml
Download https://maven.google.com/com/android/support/constraint/constraint-layout/2.0.0-beta1/constraint-layout-2.0.0-beta1.pom
Download https://jcenter.bintray.com/com/github/bumptech/glide/glide/maven-metadata.xml
Download https://jcenter.bintray.com/com/github/bumptech/glide/glide/4.9.0/glide-4.9.0.pom
Download https://repo1.maven.org/maven2/com/github/bumptech/glide/glide/maven-metadata.xml
Download https://maven.google.com/com/android/support/recyclerview-v7/28.0.0/recyclerview-v7-28.0.0.pom
Download https://maven.google.com/com/android/support/constraint/constraint-layout-solver/2.0.0-beta1/constraint-layout-solver-2.0.0-beta1.pom
Download https://jcenter.bintray.com/com/github/bumptech/glide/gifdecoder/4.9.0/gifdecoder-4.9.0.pom
Download https://jcenter.bintray.com/com/github/bumptech/glide/disklrucache/4.9.0/disklrucache-4.9.0.pom
Download https://jcenter.bintray.com/com/github/bumptech/glide/annotations/4.9.0/annotations-4.9.0.pom
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-inbox/5.14.4/pushwoosh-inbox-5.14.4.aar
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-amazon/5.14.4/pushwoosh-amazon-5.14.4.aar
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-badge/5.14.4/pushwoosh-badge-5.14.4.aar
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh-inbox-ui/5.14.4/pushwoosh-inbox-ui-5.14.4.aar
Download https://jcenter.bintray.com/com/pushwoosh/pushwoosh/5.14.4/pushwoosh-5.14.4.aar
Download https://maven.google.com/com/android/support/recyclerview-v7/28.0.0/recyclerview-v7-28.0.0.aar
Download https://maven.google.com/com/android/support/constraint/constraint-layout/2.0.0-beta1/constraint-layout-2.0.0-beta1.aar
Download https://jcenter.bintray.com/com/github/bumptech/glide/glide/4.9.0/glide-4.9.0.aar
Download https://jcenter.bintray.com/com/github/bumptech/glide/gifdecoder/4.9.0/gifdecoder-4.9.0.aar
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar
:app:generateDebugResValues
:app:generateDebugResources
:app:processDebugGoogleServices FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  /var/gimlet/tmp/47272442448200/3590452/app/src/nullnull/debug/google-services.json
  /var/gimlet/tmp/47272442448200/3590452/app/src/debug/nullnull/google-services.json
  /var/gimlet/tmp/47272442448200/3590452/app/src/nullnull/google-services.json
  /var/gimlet/tmp/47272442448200/3590452/app/src/debug/google-services.json
  /var/gimlet/tmp/47272442448200/3590452/app/src/nullnullDebug/google-services.json
  /var/gimlet/tmp/47272442448200/3590452/app/google-services.json

* 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 20s
21 actionable tasks: 21 executed
Error: /var/gimlet/tmp/47272442448200/3590452/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Thanks in advance, Anders

wfhm commented 5 years ago

Hi @andersborgabiro!

Checking it

wfhm commented 5 years ago

Hey @andersborgabiro,

According to the log you have provided, it seems that you have not added a google-services.json to your project.

What went wrong: Execution failed for task ':app:processDebugGoogleServices'. File google-services.json is missing. The Google Services Plugin cannot function without it.

May I ask you to follow steps 3 and 4 from our Cordova Integration guide?

https://www.pushwoosh.com/platform-docs/pushwoosh-sdk/cross-platform-frameworks/cordova/integrating-cordova-plugin

Regarding our guide for PhoneGap Build, we will add the necessary information to it soon. Sorry for the inconvenience

andersborgabiro commented 5 years ago

Sorry, I missed that (revamping a project I worked with 3 year ago).

wfhm commented 5 years ago

@andersborgabiro

No worries. Let us know about the result!