Giter Club home page Giter Club logo

Comments (50)

hirbod avatar hirbod commented on July 1, 2024 1

I tried your "find" command. No results. :( @mwillbanks

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@mwillbanks What version of Android are you using?

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@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.

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@mwillbanks I tested on a 4.4.4 device this afternoon with no problems.

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

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.

from phonegap-plugin-push.

Dr-Horv avatar Dr-Horv commented on July 1, 2024

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.

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

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.

from phonegap-plugin-push.

mwillbanks avatar mwillbanks commented on July 1, 2024

@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:

find platforms/android -name "android-support*.jar" | grep -v build

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.

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

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.

from phonegap-plugin-push.

mwillbanks avatar mwillbanks commented on July 1, 2024

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:

find platforms/android -name "android-support*.jar" | grep -v build
platforms/android/com.phonegap.plugins.facebookconnect/app-FacebookLib/libs/android-support-v13.jar
platforms/android/libs/android-support-v13.jar

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

I've removed android-support-v13.jar from the /libs/ folder. Also the v4.jar.
I don't use the facebookconnect plugin, my support-v13 lib is inside

/Users/myname/Downloads/facebooksdk/facebook/libs/android-support-v13.jar

I've integrated the facebook-plugin the official way (as described on developers.facebook.com)
At the time of choosing this plugin, the official one was very buggy, that was the reason I decided to use a different plugin). If I don't find a way, I will have to switch my facebook plugin to the famous one. Seems like they have fixed the problems.

I'm using this one:
https://github.com/huttarichard/cordova-facebook

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 :/

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

@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:

/.../platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:139: error: cannot find symbol
            mBuilder.setColor(iconColor);

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.
Inside of plugin.xml I can see:

        <source-file src="src/android/libs/android-support-v13.jar" target-dir="libs/" />

So what's wrong now?

Cordova Android 4.1.0
Android Device: 4.4.2 (Sony Xperia) and 5.1.1 (Samsung Galaxy S6 Edge)

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

Hi again, sorry for that spam. For everybody who stuck on this, I've managed to get this work.
Go inside of plugins/phonegap-plugin-push/src/android/libs/ and copy android-support-v13.jar

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.

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@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.

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

@macdonst thank you very much. My app is working perfectly right now. Push work's also as expected now. Finally 💃

from phonegap-plugin-push.

Dr-Horv avatar Dr-Horv commented on July 1, 2024

@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.

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@Dr-Horv yeah, the fix is crazy easy to implement and in fact there is already a PR waiting for when PGB is ready.

keab42@472548a

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.

from phonegap-plugin-push.

untitledlt avatar untitledlt commented on July 1, 2024

@hirbod did you mean platforms/android/lib/?
I tried your suggestion but that does not help.

@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?

from phonegap-plugin-push.

shprink avatar shprink commented on July 1, 2024

If you are having trouble with Facebook plugin, this fixes it:

cp platforms/android/libs/android-support-v13.jar platforms/android/com.phonegap.plugins.facebookconnect/active-FacebookLib/libs/
rm platforms/android/com.phonegap.plugins.facebookconnect/active-FacebookLib/libs/android-support-v4.jar

from phonegap-plugin-push.

000panther avatar 000panther commented on July 1, 2024

Why is everyone embedding JARs in their Plugins? I thought the new way to to it was using

<platform name="android"> <framework src="com.google.android.gms:play-services-gcm:+" /> </platform>

To pull in dependencies via gradle, and avoid all these conflicts?

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@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.

from phonegap-plugin-push.

000panther avatar 000panther commented on July 1, 2024

Good to hear! Sorry for the dupe, thought this would better fit in its own topic.

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@hobbysoldat no problem, I'm just trying to keep all the discussion on this topic in one thread.

from phonegap-plugin-push.

alamops avatar alamops commented on July 1, 2024

@shprink thank you!

from phonegap-plugin-push.

ZoRDoK avatar ZoRDoK commented on July 1, 2024

@hirbod
Tnx, you save me out of few hours of headache

from phonegap-plugin-push.

kentmw avatar kentmw commented on July 1, 2024

Has anyone experienced this issue while using Phonegap Build to assemble the apk?

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

Missing symbols. Add android support and google play library via sdk manager

from phonegap-plugin-push.

kentmw avatar kentmw commented on July 1, 2024

@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

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

hi @kentmw - sorry, I mixed something up with email notification. Please ignore my message

from phonegap-plugin-push.

adyz avatar adyz commented on July 1, 2024

I have this issue too. Any solutions that do not imply removing facebook plugin?

from phonegap-plugin-push.

000panther avatar 000panther commented on July 1, 2024

Yes. there is a version of the facebook plugin that works with this plugin.
just look at this plugins readme page, it has been updated.

phonegap plugin add https://github.com/jeduan/cordova-plugin-facebook4

2015-10-21 14:44 GMT+02:00 Florescu Adrian [email protected]:

I have this issue too. Any solutions that do not imply removing facebook
plugin?


Reply to this email directly or view it on GitHub
#51 (comment)
.

Paul Weber, BSc.
Tel: +43(0)699 18 144 914

from phonegap-plugin-push.

000panther avatar 000panther commented on July 1, 2024

It uses gradle dependencies instead of hardcoding stuff.

2015-10-21 15:39 GMT+02:00 Paul Weber [email protected]:

Yes. there is a version of the facebook plugin that works with this
plugin. just look at this plugins readme page, it has been updated.

phonegap plugin add https://github.com/jeduan/cordova-plugin-facebook4

2015-10-21 14:44 GMT+02:00 Florescu Adrian [email protected]:

I have this issue too. Any solutions that do not imply removing facebook
plugin?


Reply to this email directly or view it on GitHub
#51 (comment)
.

Paul Weber, BSc.
Tel: +43(0)699 18 144 914

Paul Weber, BSc.
Tel: +43(0)699 18 144 914

from phonegap-plugin-push.

adyz avatar adyz commented on July 1, 2024

With facebook4 I get another type of error... :(

from phonegap-plugin-push.

adyz avatar adyz commented on July 1, 2024

This to be more exact:

    FAILURE: Build failed with an exception.

    * What went wrong:
        Execution failed for task ':processArmv7DebugManifest'.
    > Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library /Users/adrian/Desktop/Vivre/Setup-Centos-PuPHPet/cordova-app-push/platforms/android/build/intermediates/exploded-aar/com.facebook.android/facebook-android-sdk/4.7.0/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="com.facebook" to force usage

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

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.

from phonegap-plugin-push.

adyz avatar adyz commented on July 1, 2024

@hirbod Thanks a ton!!!

I'm new to all this (cordova, android, ios) and it's a bit overwhelming.

from phonegap-plugin-push.

000panther avatar 000panther commented on July 1, 2024

or you could add
to your config.xml

2015-10-21 16:50 GMT+02:00 Florescu Adrian [email protected]:

@hirbod https://github.com/Hirbod Thanks a ton!!!

I'm new to all this (cordova, android, ios) and it's a bit overwhelming.


Reply to this email directly or view it on GitHub
#51 (comment)
.

Paul Weber, BSc.
Tel: +43(0)699 18 144 914

from phonegap-plugin-push.

hirbod avatar hirbod commented on July 1, 2024

Will not work when crosswalk is installed as it gets overwritten

from phonegap-plugin-push.

ndvbd avatar ndvbd commented on July 1, 2024

Guys - I see you're talking about the libs folder inside /platforms/android - but I don't have one...
How come?

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@NadavB because we no longer need to add jars to this plugin. They've been replaced with frameworks.

from phonegap-plugin-push.

bvivek20 avatar bvivek20 commented on July 1, 2024

Agreed that jars are not added now, but i still get this error GCMIntentService.java:565: error: cannot find symbol

from phonegap-plugin-push.

macdonst avatar macdonst commented on July 1, 2024

@bvivek20 update your Android Support Library.

from phonegap-plugin-push.

bvivek20 avatar bvivek20 commented on July 1, 2024

i already did that. new version is 23.1.1

i removed and added android platform again, i still get this error

from phonegap-plugin-push.

JerryBels avatar JerryBels commented on July 1, 2024

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.

:compileDebugJava myprojectpath\platforms\android\src\com\adobe\phonegap\push\GCMIntentService.java:565: error: cannot find symbol
            mBuilder.setColor(iconColor);
                    ^
  symbol:   method setColor(int)
  location: variable mBuilder of type Builder
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.
1 error
 FAILED

from phonegap-plugin-push.

fredgalvao avatar fredgalvao commented on July 1, 2024

@JerryBels That's a bug in these other plugins you mentioned, not on phonegap-plugin-push. Report an issue to their authors and request it to be updated to support gradle builds and framework dependencies.

from phonegap-plugin-push.

Apee avatar Apee commented on July 1, 2024

Wow thanks a lot guys the combination of @hirbod and @hobbysoldat made it work for me ! THANKS!!!!

from phonegap-plugin-push.

zabojad avatar zabojad commented on July 1, 2024

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:

platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:571: error: cannot find symbol
            mBuilder.setColor(iconColor);

And:

$ find platforms/android -name "android-support*.jar" | grep -v build
platforms/android/phonegap-facebook-plugin/wink-FacebookLib/libs/android-support-v4.jar
$ cordova plugin list
cordova-plugin-crosswalk-webview 1.5.0 "Crosswalk WebView Engine"
cordova-plugin-whitelist 1.2.0 "Whitelist"
phonegap-facebook-plugin 0.12.0 "Facebook Connect"
phonegap-plugin-push 1.5.2 "PushPlugin"

With latest version of Android support lib installed (23.1.1) and android target freshly removed/re-added.

If I just remove platforms/android/phonegap-facebook-plugin/wink-FacebookLib/libs/android-support-v4.jar, it does not compile neither...

What should be done ?

from phonegap-plugin-push.

zabojad avatar zabojad commented on July 1, 2024

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

from phonegap-plugin-push.

fredgalvao avatar fredgalvao commented on July 1, 2024

@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

from phonegap-plugin-push.

lock avatar lock commented on July 1, 2024

This thread has been automatically locked.

from phonegap-plugin-push.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.