cordova-plugin-firebase: Failing to build on PGB - Plugin with id 'com.google.gms.google-services' not found.
I am trying to build my app on PhoneGap Build and have forked this plugin (v2.0.4) as the instructions say (I have however not edited the config files, instead I opted to remove them in my version of the plugin, and then used <resource-file>
in my config.xml to copy them to the correct location). This seems to work fine for iOS - yay! But my Android version is refusing to build.
I am getting the following error:
BUILD FAILED in 6s
Error: /gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Script '/cordova-plugin-firebase/app-build.gradle' line: 27
* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.google.gms.google-services' not found.
* 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 6s
at ChildProcess.whenDone (/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
I have looked at other issues where people got the same error, but all of them are closed and none of them(?) seem to be about PhoneGap Build.
As I understand it the build hook scripts add something to the project level gradle file, but hooks don’t run on PhoneGap Build. Is it at all possible to build this plugin on PGB for Android at the moment?
It seems this error can also show up if you have plugins with conflicting dependencies on Google Play Services, but as far as I know no other plugins i use have a dependency on it.
<plugin name="cordova-plugin-datepicker" source="npm" spec="^0.9.3" />
<plugin name="cordova-plugin-dialogs" source="npm" spec="~1.3.3" />
<plugin name="cordova-plugin-file" source="npm" spec="~4.3.3" />
<plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.7" />
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.7.1" />
<plugin name="cordova-plugin-network-information" source="npm" spec="~1.3.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-firebase" source="git" spec="https://bitbucket.org/xxx/custom-firebase.git#xxxxxxx" />
I have tried adding <plugin name="cordova-support-google-services" spec="^1.2.1" />
as well as <plugin name="cordova-android-play-services-gradle-release" />
and <plugin name="cordova-android-firebase-gradle-release" />
in different combinations but nothing will work.
Does anyone have a solution? Does anyone have v2.0.4 working with PGB, so I at least know if it’s worth even trying to find a solution?
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 21 (5 by maintainers)
hi lighenrik, I don’t have any problem with these changes. https://github.com/gihangt/cordova-plugin-firebase/commit/2691fac41c13c7159c262d009a3eae5b76cd15c8
This is how I am using that changes on package.json “cordova-plugin-firebase”: “git+https://github.com/gihangt/cordova-plugin-firebase.git#master”,