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] Execution failed for task ':app:transformClassesWithJarMergingForDebug'. #795

Closed
harshq opened this issue Nov 22, 2017 · 8 comments

Comments

@harshq
Copy link

harshq commented Nov 22, 2017

Awesome library. Thank you for all the work you have done. Followed the installation steps. Works fine on iOS but throws this build error on android.

`Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/arch/core/internal/SafeIterableMap$ListIterator.class`

Did anyone face something similar ?

@ghost
Copy link

ghost commented Nov 22, 2017

Hi @harshq Please see #785 I don't know if it will be of any use, but that's my journey to get mapbox working.

Can I ask how you managed to get it working on iOS please @harshq ?

I'm currently getting spec not found when adding

  pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'

to pod file

https://github.com/mapbox/react-native-mapbox-gl/blob/master/ios/install.md

@Jose4gg
Copy link

Jose4gg commented Nov 22, 2017

Hi, I resolved that on my current project by doing the following in the app/build.grandle

compile(project(':mapbox-react-native-mapbox-gl')){
exclude group: 'android.arch.core'
}

@nitaliano
Copy link
Owner

@MichaelStokes pods won't work until this PR #741 gets merged in that adds support

@ghost
Copy link

ghost commented Nov 22, 2017

Thanks @nitaliano Appreciate, MapBox is looking great on Android anyway - really keen to start using it more, Thanks very much - great stuff!

@henrikra
Copy link
Contributor

henrikra commented Nov 23, 2017

We started to get same error

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/arch/core/internal/SafeIterableMap$ListIterator.class`

after we added https://github.com/tinycreative/react-native-intercom to our project. And by hours of debugging we also found that excluding exclude group: 'android.arch.lifecycle', module: 'extensions' on mapbox helped! Also the same exclude as @Jose4gg had!

So the problem must be that mapbox and react-native-intercom (and some other libraries) have colliding dependencies. Do you have idea on this @nitaliano ?

@ghost
Copy link

ghost commented Nov 23, 2017

Hi @henrikra Have you come across this issue specifically and how to resolve it?

Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lokhttp3/internal/ws/WebSocketReader;

Many thanks!

@nitaliano
Copy link
Owner

@harshq have you fixed your issue?

@ghost
Copy link

ghost commented Dec 6, 2017

Regards what @harshq originally posted, I had to update my android compile sdk versions to 26, and that seemed to resolve that one, but later had to then include exclude group: 'android.arch.lifecycle', module: 'extensions' although this is new as of today, yesterday it wasn't required so perhaps there was an update.

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

4 participants