react-native-braintree-dropin-ui icon indicating copy to clipboard operation
react-native-braintree-dropin-ui copied to clipboard

Android can't build

Open Pandazaur opened this issue 4 years ago • 0 comments

I can't build my Android app since I added the react-native-braintree-dropin-ui package. My Android app is not supporting AndroidX and I think this is the problem.

Packages:

"react": "16.8.3",
"react-native": "0.59.9",
"react-native-braintree-dropin-ui": "1.0.9"

The issue:

Program type already present: com.google.android.material.internal.package-info

> Task :app:transformDexArchiveWithDexMergerForDebug FAILED
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: com.google.android.material.internal.package-info

Tried solutions (but not working)

  • Change react-native-braintree-dropin-ui version
  • add multiEnabledDex true in my app/build.gradle
  • Migrate to AndroidX (but impossible to many packages to get up to date)
  • Use jetifier to convert/uncovert to AndroidX the node_modules packages.

Did someone face this compiling issue before ?

Pandazaur avatar Jul 29 '20 08:07 Pandazaur