- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I recently upgraded my project to the latest version of the xdk, which required moving from Cordova 3.5 to Cordova 5.1.1. This meant also updating the push notification third-party plug-in as well. 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:
symbol: method getAssets() location: class GCMIntentService .../DevDollarCandy/platforms/android/src/com/adobe/phonegap/push/PushPlugin.java:72: error: cannot find symbol token = InstanceID.getInstance(getApplicationContext()).getToken(senderID, GCM); ^ symbol: variable InstanceID .../DevDollarCandy/platforms/android/src/com/adobe/phonegap/push/PushPlugin.java:76: error: cannot find symbol token = InstanceID.getInstance(getApplicationContext()).getToken(senderID, GCM); ^ symbol: variable InstanceID .../DevDollarCandy/platforms/android/src/com/adobe/phonegap/push/PushPlugin.java:132: error: cannot find symbol InstanceID.getInstance(getApplicationContext()).deleteInstanceID(); ^ symbol: variable InstanceID Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 23 errors FAILED
I noticed in the instructions for the plug-in, it has a special procedure for compiling with android.
Compiling
As of version 1.3.0 the plugin has been switched to using Gradle/Maven for building. You will need to ensure that you have installed the Android Support Library version 23 or greater, Android Support Repository version 20 or greater, Google Play Services version 27 or greater and Google Repository version 22 or greater.
However, since I don't know what the xdk does behind the scenes, I'm not certain if this is already being done, or if something is to be changed.
How do I go about resolving this error? Thanks.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Specify version 1.2.3 of the push plugin, the newest version won't work with out current build system. We expect to have a fix for this in the near future, for now you need to use this older version of the plugin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the information Paul.
I was trying out your suggestion of switching to version 1.2.3, but saw that there was no way to change the version with a dropdown (like I have seen on other plugins). Does this perhaps require changing a configuration file manually instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, there's a bug in that plugin feed. Remove the plugin and add it as a third-party plugin with the following information:
- choose github repo
- https://github.com/phonegap-build/PushPlugin
- 2.4.0
I gave you the wrong version to use with CLI 4.1.2, use the settings I'm providing above. I will be fixing that feed mistake.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Is there a solution for this when using Cordova CLI 5.1.1?
I am getting a build error when trying to use the latest version of the Phonegap Push plugin.
Build failed... plugin contains Gradle script.
Thanks for any help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Martin, inspecting the git repo, it looks to me like version 1.4.3 is the last version to not include a gradle script. I would try that one.
However, I don't think that is the problem, our build system supports gradle, it just does not support "hook scripts" inside plugins. I think there is a conflict between this plugin and another plugin in your project. See this note in that plugin's repo: https://github.com/phonegap/phonegap-plugin-push/blob/2301364665ea5ec86f3e2d695321f0413e30d9e7/docs/INSTALLATION.md#multidex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, that seemed to fix it. I downgraded the version to 1.4.3 and the project built fine with Cordova CLI 5.1.1
Many thanks Paul!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Martin.
I did some deeper investigation and those later versions of that plugin were incorrectly added to the featured list, since they will not work due to their gradle scripts. We do not support gradle scripts in plugins, only as part of the standard Android/Crosswalk build scripts. We will not support gradle scripts (and hook scripts) in plugins until we've implemented our "isolated" build system, which is necessary to protect against malicious gradle scripts introduced by third-party plugins.

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