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

Android compile error transformClassesWithJarMergingForDebug #185

Closed
hussainanver52 opened this issue Aug 8, 2016 · 2 comments
Closed

Comments

@hussainanver52
Copy link

hello
I am trying to add this plugin for ionic framework (android) but when compiling i get different errors,
firstly i was getting multiple dex file error and i added multiDexEnabled true
now i am getting the following error

:transformClassesWithJarMergingForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/AttrRes.class

i tried following ways to fix but i am not able to fix it

  1. tried to exclude android support v4 for branch by adding dependencie
compile('io.branch.sdk.android:library:1+') {
    exclude group: 'com.android.support', module: 'appcompat'
        exclude group: 'com.android.support', module: 'support-v4'
    }

plugins i have installed are

com.darktalker.cordova.screenshot 0.1.5 "Screenshot"
cordova-plugin-admobpro 2.14.0 "AdMob Plugin Pro"
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-datepicker 0.9.3 "DatePicker"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-extension 1.3.0 "Cordova Plugin Extension"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-opener2 2.0.2 "File Opener2"
cordova-plugin-file-transfer 1.5.1 "File Transfer"
cordova-plugin-inappbrowser 1.2.1 "InAppBrowser"
cordova-plugin-splashscreen 3.1.0 "Splashscreen"
cordova-plugin-statusbar 2.1.2 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
cordova-plugin-x-socialsharing 5.0.12-dev "SocialSharing"
cordova-plugin-x-toast 2.5.0 "Toast"
es6-promise-plugin 3.0.2 "Promise"
io.branch.sdk 2.1.10 "branch-cordova-sdk"
ionic-plugin-keyboard 2.0.1 "Keyboard"
phonegap-facebook-plugin 0.12.0 "Facebook Connect"

  1. I tried to change android support v4 with android suppoert v4:13
  2. I added renderScriptTargetApi 23 to config
  3. I tried configurations { all*.exclude group: 'com.android.support', module: 'support-annotations' }
  4. I tried to refresh the cordova by removing and adding back also
@renesansz
Copy link
Contributor

@hussainanver52 , can you try doing this workaround?
Hopefully this will resolve the issue.

@hussainanver52
Copy link
Author

no it didnt worked its a issue with support v4 jar file replacing it by support v4:13 and updating the calls in facebook core to this api woked for me

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

2 participants