question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error compiling in phonegap build PLAY_SERVICES_VERSION

See original GitHub issue

What happens is that when I’m trying to compile in phonegap build, it tells me the following error:

BUILD FAILED

Total time: 0.773 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* Where:
Build file '/project/build.gradle' line: 257

* What went wrong:
A problem occurred evaluating root project 'project'.
> Could not get unknown property 'PLAY_SERVICES_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/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 already made the correction regarding the update that was made, adding the variable PLAY_SERVICES_VERSION = “11.8.0” in my config.xml being as follows:

<plugin name="cordova-plugin-googlemaps" spec="^2.2.2">
        <variable name="API_KEY_FOR_ANDROID" value="API-ANDROID" />
        <variable name="API_KEY_FOR_IOS" value="API-IOS" />
        <variable name="PLAY_SERVICES_VERSION" value="11.8.0" />
    </plugin>

I’m just uploading the www folder with the config.xml file inside it, and I know that the error is given to me by the plugin since if I remove it from the config.xml it lets me compile it normal in phonegap build.

Any help please, I need this urgent please

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
wf9a5m75commented, Feb 7, 2018

I tackled with PhoneGap build whole day, and I archived to build the plugin on PhoneGap build. The direct cause was you need to specify cli-7.1.0. But I also updated the plugin in order to support both cordova-android@6 and cordova-android@7. If you are still interested in the maps plugin, try cordova-plugin-googlemaps@2.2.3

1reaction
wf9a5m75commented, Feb 6, 2018

I found the solution. You need to specify these tags into your config.xml.

<preference name="android-build-tool" value="gradle" />
<preference name="phonegap-version" value="cli-8.0.0" />

https://github.com/mapsplugin/v2.0-demo/blob/master/config.xml

Read more comments on GitHub >

github_iconTop Results From Across the Web

cordova compile error phonegap-plugin-push android
hi (sorry for my english) im development one app with cordova, i had compile before my app including 3 diferent plugins and it...
Read more >
cordova-play-services-version-adapter - npm
The application may not compile. Common problems that this plugin can fix. com.android.build.api.transform.TransformException: com.
Read more >
compile problems with Android and the push notification plug-in
The updated plug-in (https://github.com/phonegap/phonegap-plugin-push) compiles fine on the IOS build. But on android build it gives an error:
Read more >
Supported browsers and technologies - Medallia Documentation
The SDK allows apps that support a lower version to compile, but the SDK will return an initialization error, and the functionality is ......
Read more >
Mobile App generation Cordova issues with 2.5.1 [Solved]
I have trouble with latest Meteor version to build Android app and I tried this configuration but still no build, error is:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found