0

I have a ReactNative application and have no experience in android development.

Currently, I have a problem with integrating detox with my app (app compiles and works fine if just run it through react-native run-android).

I found quite a lot of similar questions, where the general advice just setting "multiDexEnabled true" in the build.gradle file, which does not work in my case.

Another advice is the "three reshaking" for dependencies, but trying that with lack of experience brought other build errors.

So Android-masters, could you share your methods about how to fix the subject in android build process?

[UPD1] The issue appears only when I try to build app for detox using detox build -c android.emu.debug

Task :tipsi-stripe:mergeDexDebugAndroidTest FAILED
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merg
ing dex archives: 
The number of method references in a .dex file cannot exceed 64K.
...

App builds and works fine for debug/release configurations. It fails by handling tipsi-stripe package, which led me to https://github.com/tipsi/tipsi-stripe/issues/273 where nenti suggests sort of three reshaking, as I understood.

But that did not help (probably due to I have different package versions) So my question how to do repeat that advice with my packages versions.

1 Answers1

1

Make sure you're adding the "multiDexEnabled true" config to the build.gradle of the tipsi-stripe node module.

That isn't a permanent fix however.

Github issue in tipsi-stripe for reference: https://github.com/tipsi/tipsi-stripe/issues/569

NizarETH
  • 969
  • 3
  • 15
  • 38
free_willy
  • 11
  • 1