i want to use the cordova-plugin-background-geolocation v3 in a custom debugger. The build on my machine with “cordova build android” works without any failure and i can even run the app on a device. Only within the build for the custom debugger i get the following problem:
* What went wrong: A problem occurred evaluating root project 'android'. > Could not get unknown property 'GOOGLE_PLAY_SERVICES_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
In my config.xml i included the “GOOGLE_PLAY_SERVICES_VERSION” variable to the plugin which is mentioned in the documentation of the plugin (https://github.com/mauron85/cordova-plugin-background-geolocation/tree/df16ba2a294c4596622436677f364e66ea415935) .
Do i need another plugin to solve this problem? Or does anyone know how to solve this problem or can give me any advice?
I solved it by readding the plugin with variable and the cordova-platform to the project.
- Removing the plugin and the cordova-android platform from the project
- Add the plugin with GOOGLE_PLAY_SERVICES_VERSION variable:
cordova plugin add email@example.com --variable GOOGLE_PLAY_SERVICES_VERSION="11.0.1"
- Add the cordova-android platform