-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Build failing: cannot find symbol mBuilder.setColor(iconColor); #338
Comments
@jacqueskang please install the correct versions of Android Support Library and Google Play Services. |
@macdonst Thanks for reply, but I've installed the latested version of those components: |
Can you post the full output of the following command, please: |
I have same problem with @jacqueskang . I also updated all the support library as what the documentation says. I tried the suggestion of @fredgalvao and here is the output: E:\classifieding>cordova clean android BUILD SUCCESSFUL Total time: 7.034 secs FAILURE: Build failed with an exception.
BUILD FAILED Total time: 43.65 secs E:\classifieding\platforms\android\cordova\node_modules\q\q.js:126 |
@polzkey Well, that's indeed strange and I can't explain from there, for I can see that the android support libraries (among other libs) are being processed by gradle on the way just fine (apparently):
The only hint I can take for now (as I'm away from my dev environment) is that you're using JDK8 to compile the project, and I'm not familiar to how friendly android projects are to this new version of Just to be safe, can you post the output of |
@polzkey it is definitely picking up the wrong version of the support library jar. Make sure your ANDROID_HOME is pointing to the correct location. Also, you may want to try building without the Facebook plugin as it used to include it's own version of the support jar. |
Thanks @fredgalvao and @macdonst for the reply. Here is the list of plugin I use: I tried to remove the facebook connect plugin and it is now build successfully. So we can say that the problem is on the facebook connect plugin. But I cannot remove this plugin because this necessary for my project. So is there any way to fix this problem without removing the facebook connect plugin? Also @fredgalvao I run this find ./** -name '.jar' but it return File not found - '.jar'?. |
@macdonst Thanks for reply, here are the results of c:\dev\Sandbox\trunk\app>cordova clean android BUILD SUCCESSFUL Total time: 11.204 secs c:\dev\Sandbox\trunk\app>cordova build android FAILURE: Build failed with an exception.
BUILD FAILED Total time: 33.109 secs c:\dev\Sandbox\trunk\app\platforms\android\cordova\node_modules\q\q.js:126 |
That's exactly the same output. I expected gradle to handle the fact that There are no jars in the projet, as stated by @polzkey , so that's not the case. As a proof that neither [their
Some further observations:
|
@polzkey and @jacqueskang I believe you are using the plugin at: https://github.com/dhatawesomedude/phonegap-facebook-plugin This plugin uses a Facebook lib that includes Right now we are recommending a particular plugin for Facebook functionality that is setup correctly. Read https://github.com/phonegap/phonegap-plugin-push#co-existing-with-facebook-plugin |
@polzkey Thanks I confirm that the error is gone if I remove phonegap-facebook-plugin. Anyway thanks for the investigation and this helpful project! |
This is far from being the case where " Also, ngCordova is only worried about the api compatibility (javascript api), so it's not their fault or responsibility to inform or solve such issues. And last but not least, this is far from being "unreported". Check this small list of issues related to gradle, and you'll see that it's pretty old, and too many forks/pull-requests have been created to solve it, but Wizcorp was on vacation regarding the maintenance of the facebook plugin until recently, apparently. The fork @macdonst suggests you're using suffer from the same issue.
|
Anyone affected by this issue please go vote up the ngCordova issue. |
Thanks @macdonst and @fredgalvao for the reply! https://github.com/jeduan/cordova-plugin-facebook4 solve my problem! @jacqueskang just use the above facebook plugin together with 'phonegap-plugin-push'. You can read more info here as @macdonst stated: Once again thank you very much @macdonst and @fredgalvao, I really appriciate your help :) ! |
I also confirm that the plugin at https://github.com/jeduan/cordova-plugin-facebook4 solved this problem. I think they should pull the fix asap from this fork and add to the official plugin. |
I agree you should put this plugin on the official website, this error off my long time. |
I had same issue. In my |
@elesveselka have you tried the above solution we mention? |
I don't have the facebook plugin installed, so I didn't try that, but it seems as general problem @fredgalvao mentioned: "Any plugin that includes raw jars or resources will be incompatible with any other plugin that uses the same jars or resources". As I've been upgrading cordova tools and also cordova platforms, and there seems remanied JARs in the "libs" directory and were picked up by the build process. I've deleted all the JARs from "libs" and build works fine. In both cases, the build seems using following Gradle's dependencies with success:
|
This thread has been automatically locked. |
I'm using latested version of cordova (5.4.0) to build a new project with phonegap-plugin-push 1.4.2 installed.
I get the following error:
C:\Temp\temp\myApp2\platforms\android\src\com\adobe\phonegap\push\GCMIntentService.java:552: error: cannot find symbol
mBuilder.setColor(iconColor);
^
symbol: method setColor(int)
location: variable mBuilder of type Builder
Note: C:\Temp\temp\myApp2\platforms\android\src\com\adobe\phonegap\push\PushPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
The text was updated successfully, but these errors were encountered: