samzilverberg/cordova-mixpanel-plugin

Android build fails with 2.2.0

Closed this issue · 10 comments

Updated plugin from 2.1.0 => 2.2.0 and now get this error. Reinstalling 2.1.0 works.
screen shot 2016-08-05 at 1 34 18 pm

im guessing its caused by this new dependency in plugin.xml:
<framework src="com.google.android.gms:play-services:3.1+"/>

try opening the android sdk manager, scrolling down to extras and installing Google Play Services (perhaps also google repo).

Before releasing I actually tried uninstalling it and the andorid platform, readding and building and it worked, but maybe it was cached somehow.

let me know if that works, if yeah i'll add it to the README

Check my PR: #32

@samzilverberg, I have play services and google repo installed. removed android platform, added again and built with the same error.

i took a more careful look at your screenshot and i see now the error is not because the play services lib is missing but rather because there are more than 1 packages with that name!

i think @ZiFFeL1992 was right in his pr fix to just require any play services version and not 3.1+ as it is now.
you probably have another play services installed (through android sdk or another plugin) and then probably the plugin.xml dep causes another (diff version?) to be installed.

just to make sure, can you tell me which version of play services do you have installed?

looks like version 32.

screen shot 2016-08-09 at 10 50 59 am

i merged in and released 2.2.1 which depends on ANY version of play services (thanks @ZiFFeL1992 ).

try it out and let me know if it helps.

I suspect you may have another plugin that is requiring a lower version of play services, thus creating 2 play services libs of different versions which fails your build.
are you able to share your plugin list? i'd be interested in investigating further.

other than that, if 2.2.1 still doesnt solve it for you, try also removing/adding the plugin, the platform, cordova clean and generally turning it on and off again 😄

Is all about versions, you can't use different versions of any Google Play Services library.

Here's my plugin list

com.cordova.plugins.sms 0.1.10 "Cordova SMS Plugin"
com.darktalker.cordova.screenshot 0.1.5 "Screenshot"
cordova-fabric-plugin 1.0.8 "cordova-fabric-plugin"
cordova-plugin-actionsheet 2.2.2 "ActionSheet"
cordova-plugin-app-version 0.1.8 "AppVersion"
cordova-plugin-camera 2.2.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-contacts 2.1.0 "Contacts"
cordova-plugin-crosswalk-webview 1.8.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-device-orientation 1.0.3 "Device Orientation"
cordova-plugin-dialogs 1.2.1 "Notification"
cordova-plugin-facebook4 1.7.1 "Facebook Connect"
cordova-plugin-file 4.2.0 "File"
cordova-plugin-file-transfer 1.5.1 "File Transfer"
cordova-plugin-geolocation 2.2.0 "Geolocation"
cordova-plugin-globalization 1.0.3 "Globalization"
cordova-plugin-inappbrowser 1.4.0 "InAppBrowser"
cordova-plugin-keyboard 1.1.4 "Keyboard"
cordova-plugin-mixpanel 2.1.0 "Mixpanel"
cordova-plugin-network-information 1.2.1 "Network Information"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-vibration 2.1.1 "Vibration"
cordova-plugin-whitelist 1.2.2 "Whitelist"
cordova-plugin-wkwebview-engine 1.0.3 "Cordova WKWebView Engine"
es6-promise-plugin 3.0.2 "Promise"
io.branch.sdk 2.1.10 "branch-cordova-sdk"
onesignal-cordova-plugin 1.13.0 "OneSignal Push Notifications"

@ZiFFeL1992 @samzilverberg thanks for the quick fix! Just tested and seems to have fixed my issue.

your'e welcome.
I've looked at around half the plugins you posted and i'm starting to think that actually this plugin caused the problem by requiring 3.1+ when you had 3.2 (2 different versions...) 😉