- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issues described below have been resolved with the CLI 5.1.1 build system. You should no longer see these problems. If you do continue to see them, please post in the forum with specific build error log details (similar to what is shown below).
---- RESOLVED ----
There are many instances of Android and Crosswalk builds using CLI 5.1.1 that result in an error message similar to the following (see the end of your detailed build error log):
---- error message found near the end of your detailed build log ----
FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'android'. > Could not resolve all dependencies for configuration ':_debugCompile'. > Could not find any version that matches com.google.android.gms:play-services-gcm:+. Searched in the following locations: https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/maven-metadata.xml https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/ Required by: :android:unspecified > Could not find any version that matches com.android.support:support-v4:+. Searched in the following locations: https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml https://repo1.maven.org/maven2/com/android/support/support-v4/ Required by: :android:unspecified
---- end of error message found near the end of your detailed build log ----
We do not have a good solution for this issue, at this time. We are working on finding an adequate short-term and a permanent long-term solution. Some of the issues are license restrictions surrounding the hosting and redistribution of third-party libraries; so this is simply a technical issue. This problem only applies to Android and Crosswalk builds and should only be seen when using CLI 5.1.1 (and higher).
Error messages similar to that shown above, which include a reference to a failed search of "maven," and that typically contain a reference to a com.google.android.* library, are usually being caused by a new version of one of your plugins due to:
- a change to using Gradle (from using Ant) for Android (and Crosswalk) Cordova CLI 5 builds
- plugins being updated to utilize Gradle and Maven as a way to include some third-party libraries
- some third-party plugins are incompatible with Gradle builds and can only be used with CLI versions <5
The fundamental problem is due to a new way to reference third-party libraries in Android builds, with the adoption of the Gradle build system, which was instituted by the Apache Cordova project for Android builds with the change to CLI 5. This change only impacts Android and Crosswalk builds!
Workarounds include:
- Using an older version of the plugin that is causing the problem (determining which plugin is the culprit cannot be easily deduced from the error message, so you have to remove plugins one at a time and rebuild your app to figure out which is causing the problem).
- Using the CLI 4.1.2 build option (which uses ANT rather than Gradle to build Android images).
- Using a combination of both of the above workarounds (older plugin and CLI 4.1.2).
- Looking for a branch or fork of the offending plugin that does not rely on this new technique for specifying the inclusion of external third-party libraries (these are usually called "PhoneGap Compatible" see the technical details section below for more information).
One problem with simply using an older version of a plugin, of course, is that older versions of plugins may include bugs that have been fixed in more recent versions... To tackle this issue, a few plugin developers have created a special branch of their plugin to deal with the error above (which tends to be unique to cloud-based build systems). Sometimes you may also find a fork of the plugin that has been modified by another developer, that does the same thing. Posting a request with the plugin developer, on their GitHub repo can help to get an appropriate branch created, as a short-term solution.
Identifying usable branches and forks is a time-consuming problem. We are working through the list of featured plugins to identify reasonable alternatives. In some cases we may have to remove a plugin from the featured list if we cannot find a usable alternative, or you may find notes in the description indicating that the plugin is only suitable for a specific CLI build version.
For those who are curious about some of the technical details, please read on...
This problem is caused by a new technique available to CLI 5 Cordova plugin developers, for specifying how to include libraries in Android (and Crosswalk) Cordova builds. An example can be found in the recent version of the PushWoosh plugin. Within the Android <platform> section of the plugin.xml file inside that plugin you will find some lines similar to the following:
<platform name="android"> ... <framework src="com.google.android.gms:play-services-gcm:+" /> <framework src="com.android.support:support-v4:+" /> ... </platform>
Previous versions of that plugin would have included the libraries directly, usually embedded inside a JAR file, as shown by these statements (which appears to have happened at the transition from version 3.6.4 to version 3.6.5 of this particular plugin):
<platform name="android"> .... <source-file src="src/android/lib/android-support-v4.jar" target-dir="libs" /> <source-file src="src/android/lib/google-play-services.jar" target-dir="libs" /> .... </platform>
The "framework" reference above is new to the Cordova CLI 5 build system (for Android and Android-Crosswalk builds). It allows plugin developers to reference library files in a Maven repository, without having to include those library files in the plugin directly. In most cases, this "Maven repository" is assumed to point to directories that would be found in a local Android Studio development environment, and can optionally be located in an external Maven repository.
Unfortunately, not all of libraries that are expected to be stored in a local Maven repo are guaranteed to be part of the Intel XDK build system (for a variety of reasons) nor are they guaranteed to be located in a publicly accessible Maven repo. Some plugin developers have found ways to get around this problem; for example, see what the developers of the OneSignal plugin have done regarding this problem in the PhoneGap Build section of this document.
Note: the PhoneGap Build config.xml directive:
<gap:plugin name="my-favorite-plugin" source="npm" />
is equivalent to adding a Third-Party Plugin in the Intel XDK using the Cordova plugin registry option (where the name field in the tag above is equivalent to the Plugin ID field in the Import a Third-Party Plugin dialog box). The "source=npm" attributed in that directive means "retrieve this from the Cordova npm plugin registry." If you do not specify a Version Number in the Intel XDK dialog the latest version of that plugin will be retrieved from the Cordova npm plugin registry.
You can search for packages in the npm package repo by going here: https://www.npmjs.com/package/package or more directly, limit your search of the npm repo for only Cordova plugins by going here: http://cordova.apache.org/plugins/#/. If you have npm installed on your system, you can view the versions and other details for a specific plugin using this command:
npm show plugin-package-name
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I face same problem before 3-4 days for the push notification.
You can use this newly updated plugin this gives perfect build with CLI 5X for me.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page