Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This plugin is incompatible with phonegap-plugin-push plugin because android-support-v4.jar is included (cordova build android failing) #1183

Open
jacqueskang opened this issue Nov 19, 2015 · 9 comments

Comments

@jacqueskang
Copy link

If both phonegap-facebook-plugin and phonegap-plugin-push are installed in the same project then cordova build android will fail.
Investigation shows that this is because android-support-v4.jar is included in this plugin.
See phonegap/phonegap-plugin-push#338

Is there a way to fix this or provide any walkaround please?
Thanks in advance.

@tutcugil
Copy link

i have same issue, cant work this plugin with phonegap-plugin-push because of push uses support 13 this plugin uses support v4

any solution for this?

@bau720123
Copy link

hello guys
don't waste your time in "phonegap-facebook-plugin"
please follow this
https://github.com/phonegap/phonegap-plugin-push#co-existing-with-facebook-plugin

@Clebiez
Copy link

Clebiez commented Nov 28, 2015

Hi, I found a solution for this problem after many time spent on Google :p
You must use cordova 5.0 (or equivalent in phonegap) for this solution.

Found the plugin.xml in plugins/com.phonegap.plugins.facebookConnect and replace the line 60

<framework src="platforms/android/FacebookLib" custom="true" />

by this :

<framework src="com.android.support:support-v4:+" />
<framework src="com.facebook.android:facebook-android-sdk:3.23.0" />

You will replace a local dependence by a graddle dependence more efficient and without conflict

EDIT : You must reinstall the platform after that.

@boten
Copy link

boten commented Nov 28, 2015

hi
i replaced the line but getting the same error ?
do i need to refresh my android project somehow ?

@Clebiez
Copy link

Clebiez commented Nov 28, 2015

Yes sorry, you must rm the platform and add it again to consider this change.

@boten
Copy link

boten commented Nov 28, 2015

the build is working again :)

thank you :)

@programmersujeet
Copy link

@Clebiez , Just implemented your hack. Yes its working, amazing

rafaelcoutinho added a commit to rafaelcoutinho/phonegap-facebook-plugin that referenced this issue Feb 23, 2016
@mribbons
Copy link

I also encountered this issue, I am also using another plugin which may be causing the conflict.

The fix identified by @Clebiez works.

Can this be integrated into the repo?

I would be happy to set up a PR but I don't know enough about cordova to understand the ramifications of the change.

@dgavriil
Copy link

Clebiez you are a god!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants