-
Notifications
You must be signed in to change notification settings - Fork 57
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
Multiple dex files define Landroid/support/annotation/AnimRes #34
Comments
It seems the pushplugins use android-support v13 in general and the modified v4 of the facebook sdk conflicts with it, so the issue should probably be solved on that side |
Perhaps the Fb plugin can be changed by scoping the v4 lib to only their classes. So this line https://github.com/Telerik-Verified-Plugins/Facebook/blob/master/platforms/android/FacebookLib/libs/BUCK#L5 Becomes |
@kaansoral I don't have the Facebook plugin installed but still I get the same Exception when building as you do |
I've tested maybe 100 things to combine the v4/v13 android-support usages of the push plugin and the facebook plugin, none worked Isolating v4 to the facebook plugin makes a lot of sense, yet I'm not fluent enough in java/android/build-logic to achieve that I just tested the Telerik version of the fb plugin, with android repositories from the android SDK itself, when the fb plugin is added, this is the error: (for this issue, the wizcorp version and your version behave the same, I'm also using your version of the push plugin) It probably invalidates the v13 somehow Both plugins work well without the other, when combined, trying different things just shifts the error and issue to a different one |
Eddy, I've just tested the BUCK build solution, however it didn't work, along with many other alternatives I've tried I might be missing something, but that BUCK file might be ignored, in the end I replaced the entire thing with random characters, the plugin addition from a static directory succeeded |
I'm using the telerik versions of the FB/Push plugins When combined, the error is related to the ".setColor" modification I've also tested commenting out the ".setColor" routine, in that case the error falls back to the regular dex clash one I give up temporarily at this point, would be great if you could find a solution to this issue @EddyVerbruggen :) |
Hey @kaansoral, really appreciate the effort. I will take a look shortly! |
Not at all, thank _you_ |
Hey @kaansoral I've just released an update to this plugin as well as Facebook. Can you update both and give it a shot? |
Hi @EddyVerbruggen - thanks a lot! :) It built and worked well in my limited trials, facebook login was working, gcmregid was present (I didn't yet verified the detailed functionalities of both plugins, but I'm guessing they should work) I guess I should test the push plugin in detail, as v13 of the pushplugin was replaced with v4, wasn't there any dependency to v13 specifically? |
Yeah there was but I've now added a newer version of v4 to both plugins which cover the same features as the v13 lib we were using (especially the |
It's probably better to use the new framework tags to include the support libraries. That way Gradle sorts everything out. I've included that change here: #52 |
Hello, |
to follow the answer of @kaansoral here Wizcorp/phonegap-facebook-plugin#1011 (comment)
|
Interesting, What is the exact error? Updating the android SDK's and installing static repositories might also help (they are an optional add-on, forgot the exact name, but sometimes if things are missing they are fetched dynamically from maven, it's best to just install them from the Android SDK instead) |
Here is the end of the build
I'm building my first app with cordova, not sure about how to know if I have something to update, in the android sdk manager nothing is marked as "has update". |
They are in the "Extras" section of "Android SDK Manager" They are called "Google Repository", "Google Support Repository", "Google Support Library" etc. |
They are installed |
Oh no I have "Google Repository", "Android Support Repository", "Android Support Library" but I assume it's what you mean isn't it ? |
Yes they are what I meant, in this case, I have no idea what's wrong with your build I'm on OSX by the way |
So am I :( |
Problem solved, |
No problem, it's a very interesting solution Unfortunately these kind of library clash issues have been very frequent lately, watch out for the google analytics plugin one, it's only easily solveable by manually reverting that plugin to an older state |
After adding this plugin I'm getting this error: Also here is my full plugin list if it helps. cc.fovea.cordova.purchase 3.11.0 "Purchase"
com.google.playservices 19.0.0 "Google Play Services for Android"
com.ionic.keyboard 1.0.4 "Keyboard"
com.phonegap.plugins.PushPlugin 2.5.8 "PushPlugin"
com.phonegap.plugins.facebookconnect 0.11.2 "Facebook"
com.verso.cordova.clipboard 0.1.0 "Clipboard"
cordova-plugin-camera 1.2.0 "Camera"
cordova-plugin-console 1.0.1 "Console"
cordova-plugin-crosswalk-webview 1.2.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.0.1 "Device"
cordova-plugin-file 2.1.0 "File"
cordova-plugin-file-transfer 1.2.0 "File Transfer"
cordova-plugin-geolocation 1.0.1 "Geolocation"
cordova-plugin-google-analytics 0.7.1 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.0.1-dev "InAppBrowser"
cordova-plugin-network-information 1.0.1 "Network Information"
cordova-plugin-splashscreen 2.0.1-dev "Splashscreen"
cordova-plugin-statusbar 1.0.1 "StatusBar"
cordova-plugin-whitelist 1.0.0 "Whitelist"
org.apache.cordova.globalization 0.3.4 "Globalization"
twitter-connect-plugin 0.4.0 "Twitter Connect" |
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes
I get this error when building android with the latest cordova
Generally Eddy's version of the plugins have these issues fixed, I hoped the same with this plugin, but it wasn't the case this time :)
The PushPlugin somehow clashes with the libraries of the facebook plugin, my guess is, as removing one of them prevents the issue
The text was updated successfully, but these errors were encountered: