question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Before 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

  1. react-native init BugDemo --version react-native@0.60.0
  2. cd BugDemo && npm install --save tipsi-stripe react-native-maps
  3. Add maven { url "https://jitpack.io" } to the root build.gradle in allprojects { repositories { ... (for tipsi-stripe)
  4. npm i && react-native run-android

Describe what you expected to happen:

  1. The project builds smoothly and I have an amazing day

Reproducible sample code

On the way.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:27 (2 by maintainers)

github_iconTop GitHub Comments

82reactions
JaviGarciaWozzocommented, Aug 7, 2019

Hello guys,

to fix this we made the manual link as is said in the docs. Also we added to android/app/build.gradle

implementation 'com.android.support:design:27.1.0'
compile (project(':tipsi-stripe')) {
    exclude group: 'com.google.android.gms'
    exclude group: 'com.google.firebase'
}

and finally added a file called react-native.config.js to the root of our project with this code:

  dependencies: {
    'tipsi-stripe': {
      platforms: {
        android: null,
        ios: null,
      }
    }
  },
};

This way we avoid autolinking of tipsi-stripe.

I hope it works for you

18reactions
dancherbcommented, Aug 11, 2019

Hello guys,

to fix this we made the manual link as is said in the docs. Also we added to android/app/build.gradle

implementation 'com.android.support:design:27.1.0'
compile (project(':tipsi-stripe')) {
    exclude group: 'com.google.android.gms'
    exclude group: 'com.google.firebase'
}

and finally added a file called react-native.config.js to the root of our project with this code:

  dependencies: {
    'tipsi-stripe': {
      platforms: {
        android: null,
        ios: null,
      }
    }
  },
};

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 = {

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Android build failure with different errors without ...
The build failures for Android was due to the publish of the React Native version 0.71.0-rc0 . Note: Error may be different but...
Read more >
React Native CLI full setup and error fix - YouTube
React Native CLI full setup and error fix: error Failed to install the app. Make sure have Android. 11K views 1 year ago....
Read more >
Gradle Build Failed. Android resource linking failed.
I am getting this error and cant build for android. I was just starting out with unity so im not sure what to...
Read more >
"Could not open settings remapped class cache " - Development
That's the error i am seeing after trying to run the android app from Android Studio. (base) MacBook-Air:ReactNativeClient siddhantsehgal$ npm run start-android.
Read more >
Understanding dependency resolution - Gradle User Manual
How Gradle retrieves dependency metadata? The Dependency Cache; Dealing with ephemeral builds; Accessing the resolution result programmatically. This chapter ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found