Fresh react-native project (0.60.0) fails to build with react-native-maps and tipsi-stripe installed (DexArchiveBuilderException: Failed to process C:\....gradle\caches...\classes.jar)
See original GitHub issueBefore I have submitted the issue
[X] I have read an installation guide
[X] I know that for an iOS I need to install pods because I’ve read the installation guide
[X] I have read a linking guide and checked that everything is OK like in manual linking guide
[X] I know that before using tipsi-stripe
I need to set options for my app as described in usage guide
Tipsi-stripe installs and runs fine (linking automatically) on its own with react-native 0.60.0. The issue only seems to be present in combination with react-native-maps (react-native-maps also seems to run fine on its own).
Bug
A fresh React-Native project at 0.60.0 with react-native-maps on the latest version (0.25.0) and tipsi-stripe on the latest version (7.5.0) fails to build with the following error. A fresh project with either package on its own seems to work fine.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\cherb\.gradle\caches\transforms-2\files-2.1\8e9a36921623b25c921be84cb9af8f17\jars\classes.jar
There’s quite a lot of warnings and errors on the way - full log here: https://pastebin.com/Q7TY6UWm
Environment info
All of the below are the defaults for react-native 0.60.0.
- android.compileSdkVersion 28
- android.buildToolsVersion 28.0.3
- android.defaultConfig.minSdkVersion 16
- android.defaultConfig.targetSdkVersion 28
- android.defaultConfig.multiDexEnabled (if exists) - tried with both true and omitted, both fail
React native info output:
System:
OS: Windows 10
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 707.21 MB / 7.82 GB
Binaries:
Node: 10.15.2 - C:\Program Files\nodejs\node.EXE
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
Watchman: 4.9.4 - C:\Users\cherb\AppData\Roaming\npm\watchman.EXE
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5264788
Library version: 7.5.0
Steps To Reproduce
react-native init BugDemo --version react-native@0.60.0
cd BugDemo && npm install --save tipsi-stripe react-native-maps
- Add
maven { url "https://jitpack.io" }
to the root build.gradle inallprojects { repositories { ...
(for tipsi-stripe) npm i && react-native run-android
Describe what you expected to happen:
- The project builds smoothly and I have an amazing day
Reproducible sample code
On the way.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:27 (2 by maintainers)
Top GitHub Comments
Hello guys,
to fix this we made the manual link as is said in the docs. Also we added to android/app/build.gradle
and finally added a file called react-native.config.js to the root of our project with this code:
This way we avoid autolinking of tipsi-stripe.
I hope it works for you
Amazing, this did the job - thank you.
For those unfamiliar with react-native.config.js files, the first line (missed out above) should be:
module.exports = {