Program type already present: com.mapbox.rctmgl.BuildConfig
See original GitHub issueDescribe the bug Hello 😄 I’m trying to build a project that uses react-native-mapbox-gl. Previously I have done all the steps on https://github.com/react-native-mapbox-gl/maps/blob/master/android/install.md. But this error appears on the app build.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDevRelease'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives:
Program type already present: com.mapbox.rctmgl.BuildConfig
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
To Reproduce Follow this guide https://github.com/react-native-mapbox-gl/maps/blob/master/android/install.md and set this variable on android/app/build.gradle :
defaultConfig {
...
multiDexEnabled true
}
Expected behavior Build the project correctly
Versions (please complete the following information):
- Platform: Android
- Device: no
- Emulator/ Simulator: no
- OS: Ubuntu 16
- react-native-mapbox-gl Version 7.2.0
- React Native Version 0.61.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Program type already present: com.mapbox.rctmgl.BuildConfig
Describe the bug Hello :D I'm trying to build a project that uses react-native-mapbox-gl. Previously I have done all the steps on ...
Read more >Program type already present: BuildConfig - android
You are getting this error because you a have library module which has the same package name as the app module.
Read more >rnmapbox/Lobby - Gitter
Hello all, loving the community on here. I'm trying to use '@rnmapbox/maps' in React Native. Our app is for fishermen recording hauls, it...
Read more >com.kakeragames.unimgpicker.BuildConfig Error in Unity
My Latest 5 Vlogs on Mr.RK Subscribe Now for more updates:ISKCON Delhi Shree ... Thank you for your time :-) Program type already...
Read more >native part of mapbox react native libraries were not registered ...
podspec:6: warning: already initialized constant Pod::REACT_NATIVE_MAPBOX_MAPBOX_IOS_VERSION ...ReactNativeNoExpo/node_modules/@react-native-mapbox-gl/maps/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nan140114 do you have anything mapbox related in your gradle?! We need to clean our docs up. With autolinking and 0.60+ you don’t need anything in gradle
Greetings to both of you. Yes, I followed the guide on the docs to link manually the library on the android app. Following the @mfasekas advice, I removed all the Gradle and Java (MainApplication.java) set up and it worked. Thank you.
Note: I’m going to meet up with the development team to consider using the last release.
Thank you for time again!