React Native: Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’

Got same error a couple of days back, seems you’ve got to enable multidex to true and delete the build folder.

Go to android/app/build.gradle and add the line multiDexEnabled true and set minSdkVersion to 21 inside defaultConfig like this

...
android{
  ...
  defaultConfig {
    ...
    minSdkVersion 21
    multiDexEnabled true
  }
  ...
}
...

You can check this thread out on react-native

https://github.com/oney/react-native-gcm-android/issues/32

Leave a Comment