-
Notifications
You must be signed in to change notification settings - Fork 1.9k
GCMIntentService.java:139: error: cannot find symbol mBuilder.setColor(iconColor); #51
Comments
@mwillbanks What version of Android are you using? |
@mwillbanks are you using the "android-support-v13.jar" that is provided in this project? It contains the proper jar that has the setColor method. |
@mwillbanks I tested on a 4.4.4 device this afternoon with no problems. |
I've the same problem right now. I needed to delete the support-v13 reference cause by "multiple dex" warnings. I can't any way to get this plugin compile. |
Having the same problem. With support-v13 file in platforsm/android/libs I get multiple dexfiles error. If I "android-support-v13.jar" then I get this problem. |
I give up. Struggeled more then 4 days with this problem and I can't get any support on this. As soon as Facebook is integrated (or any other plugin which needs the v13 support, we get this) v13 support seems to be integrated only because of the "setColor()" method. Now my notifications look ugly, but I've commented out the line to get the build compiled. |
@hirbod you need to remove the support library from the facebook SDK, basically search your codebase for where the items are before you build... AKA:
If you find duplicates or multiple versions, remove the multiple versions. You can only have 1 support library in your project. The issue becomes is that many plugins attempt to ship one and it causes conflicts between projects. I suggest removing all support libraries that a plugin has and then to manually place one in your libs folder. |
Thank you very much. If I remove the support lib from facebook, I can't compile. The only working solution for me was to remove all support libs from /libs/ inside of platform/android and to leave one support file inside of facebook (I have "CCSoft" Facebook plugin installed, the SDK isn't inside of my platform folder, it's placed in my download folder and got referenced manually inside of eclipse as library). I can't switch to any other facebook plugin at the moment, but I will try your suggestion, maybe I can find a way. |
I tried your "find" command. No results. :( @mwillbanks |
Interesting, your paths might be references differently than provided your earlier comment then; all of mine are inside of the platforms/android folder itself. You would need to add the additional paths in that case. For instance:
|
I've removed android-support-v13.jar from the /libs/ folder. Also the v4.jar.
I've integrated the facebook-plugin the official way (as described on developers.facebook.com) I'm using this one: Before I've installed this plugin, everything worked. I need to find a way to compile both plugin-push and facebook. I need a way to tell the external lib to use the libs inside of cordova, not it's own, but I googled like 10 hours for that problem and I feel desperate :/ |
@mwillbanks and @macdonst I've removed the facebook plugin and also the push plugin, removed android platform, readded android platform and the push plugin, but I get this error message:
When I look inside of my /libs/ folder, there is support-v13.jar and support-v4.jar I've opened the plugin folder, support-v13 and gcm.jar are inside. <source-file src="src/android/libs/android-support-v13.jar" target-dir="libs/" /> So what's wrong now? Cordova Android 4.1.0 |
Hi again, sorry for that spam. For everybody who stuck on this, I've managed to get this work. Copy it and replace with the one inside of platforms/android/src Double-Check that there is NO android-support-v4.jar inside of it. When you find v4, just delete it. Now, the plugin build without problems. If you don't remove v4, it wont work. I will change my facebook plugin to https://github.com/jeduan/cordova-plugin-facebook4 as this one seems to be a drop-in-replacement and much more active then the official one or the cc-soft one. They also have fixed the multiple DEX problem. |
@hirbod I'm glad you got it resolved. As soon as PhoneGap Build supports gradle I'm switching this plugin to use the "framework" tag which should avoid these dexing problems for good. |
@macdonst thank you very much. My app is working perfectly right now. Push work's also as expected now. Finally 💃 |
@macdonst I'm having similiar issue as Hirbod. Although I cannot seem to resolve it by the same steps. I've tried about anything and lost track of what I have and haven't tried. I've concluded that the facebook-connect plugin I'm using https://github.com/uofmmike/phonegap-facebook-plugin clashes with this one on the support-library thing. It seems in either way I remove them respectively plugin doesn't compile. Do you have any tips of step to try resolve this? Would it be hard to change this plugin to use framework tag? I'm not using phone gap build, rather cordova build. Which as I understand it has gradle support. |
@Dr-Horv yeah, the fix is crazy easy to implement and in fact there is already a PR waiting for when PGB is ready. I will try and use the Facebook plugin with this plugin in an app later to see if there is anything I can do in the meantime. |
@hirbod did you mean @macdonst I have tried to replace those lines as in keab42/phonegap-plugin-push@472548a but that does not help either... Any other fixes available? |
If you are having trouble with Facebook plugin, this fixes it:
|
Why is everyone embedding JARs in their Plugins? I thought the new way to to it was using
To pull in dependencies via gradle, and avoid all these conflicts? |
@hobbysoldat you are correct. However, PhoneGap Build does not support Gradle yet so I haven't made the switch. I think when I get back off vacation I will switch it and PGB users will have to use version 1.2.2 or earlier. |
Good to hear! Sorry for the dupe, thought this would better fit in its own topic. |
@hobbysoldat no problem, I'm just trying to keep all the discussion on this topic in one thread. |
Has anyone experienced this issue while using Phonegap Build to assemble the apk? |
Missing symbols. Add android support and google play library via sdk manager |
@hirbod, sorry, was that comment directed at my question? Phonegap Build, or PGB, found here: https://build.phonegap.com, builds the application in the "cloud" or at least on adobe's server. I don't have access or control of sdk manager while using PGB |
hi @kentmw - sorry, I mixed something up with email notification. Please ignore my message |
I have this issue too. Any solutions that do not imply removing facebook plugin? |
Yes. there is a version of the facebook plugin that works with this plugin. phonegap plugin add https://github.com/jeduan/cordova-plugin-facebook4 2015-10-21 14:44 GMT+02:00 Florescu Adrian [email protected]:
Paul Weber, BSc. |
It uses gradle dependencies instead of hardcoding stuff. 2015-10-21 15:39 GMT+02:00 Paul Weber [email protected]:
Paul Weber, BSc. |
With facebook4 I get another type of error... :( |
This to be more exact:
|
I know this error. You're using Crosswalk @adyz and there is currently a bug. You need to run like that > cordova run android -- --minSdkVersion=15 or when you want to release it > cordova run android --release -- --minSdkVersion=15 Did you see the double -- ? Yes, it has to be EXACTLY like this, or it won't work. |
@hirbod Thanks a ton!!! I'm new to all this (cordova, android, ios) and it's a bit overwhelming. |
or you could add 2015-10-21 16:50 GMT+02:00 Florescu Adrian [email protected]:
Paul Weber, BSc. |
Will not work when crosswalk is installed as it gets overwritten |
Guys - I see you're talking about the libs folder inside /platforms/android - but I don't have one... |
@NadavB because we no longer need to add jars to this plugin. They've been replaced with frameworks. |
Agreed that jars are not added now, but i still get this error GCMIntentService.java:565: error: cannot find symbol |
@bvivek20 update your Android Support Library. |
i already did that. new version is 23.1.1 i removed and added android platform again, i still get this error |
Having the same issue, running latest version of Cordova, all is up to date in the Android SDK manager, and tried to remove and add the platform / the plugin many times... Note that I also removed the Facebook plugin completely (as well as another one with android-support dependency) then it builds. But whenever I'm adding again any of those 2 plugins (Facebook or the other one) build fails.
|
@JerryBels That's a bug in these other plugins you mentioned, not on |
Wow thanks a lot guys the combination of @hirbod and @hobbysoldat made it work for me ! THANKS!!!! |
I'm experiencing this error but reading at your previous comments, I'm not really sure what I should do. Here is what I have:
And:
With latest version of Android support lib installed (23.1.1) and android target freshly removed/re-added. If I just remove What should be done ? |
Uups, I've posted too fast, the issue actually comes from the facebook plugin and I've managed to fix this issue with this: Wizcorp/phonegap-facebook-plugin#1183 |
@zabojad or you could follow the suggested steps at https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#co-existing-with-facebook-plugin |
This thread has been automatically locked. |
symbol: method setColor(int)
location: variable mBuilder of type Builder
The text was updated successfully, but these errors were encountered: