Facebook and google maps plugins don't work together in PhoneGap app

268 Views Asked by At

I am going to create the app that shows google map and required social login with facebook. I decided to use: https://github.com/Wizcorp/phonegap-facebook-plugin and https://github.com/wf9a5m75/phonegap-googlemaps-plugin I don't know what is a reason, but these plugins perfectly work alone, but when I installed them together I got next error:

BUILD FAILED
C:\Users\{USER_NAME}\AppData\Local\Android\sdk\tools\ant\build.xml:577: Jar mismatch! Fix your dependencies
Total time: 1 second
{APP_PATH}\platforms\android\cordova\node_modules\q\q.js: 126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "ant debug -f {APP_PATH}\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR running one or more of the platforms: Error: {APP_PATH}\platforms\android\cordova\run.bat: Command failed with exit code 8
You may not have the required environment or OS to run this project

I am not experienced in PhoneGap development, but I guess that both plugins are doing some changes in platform dependencies (and rewriting changes of another plugin). Could anybody help me with this?

1

There are 1 best solutions below

2
On BEST ANSWER

I got the answer of google-maps plugin creator:

The facebook plugin contains android-support-v4.jar, and the map plugin installs another android-support-v4.jar.

Remove one of them.

I took off android-support-v4.jar from com.phonegap.plugins.facebookconnect folder and left it in libs folder. It was solved my issue (fb and g-maps work together). So I can mark this question as closed now. I leave this answer for anybody who meets this issue like me.