DEV Community

Cover image for React Native Error: Task :app:mergeDexDebug FAILED
Andi Rustianto
Andi Rustianto

Posted on

React Native Error: Task :app:mergeDexDebug FAILED

React Native Error: Task :app:mergeDexDebug FAILED

Android 5.0 (API level 21) and higher uses ART which supports multidexing. Therefore, if your minSdkVersion is 21 or higher, the multidex support library is not needed.

Modify build gradle at path android/app/build.gradle

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0"

         defaultConfig {
             minSdkVersion 14 //lower than 14 doesn't support multidex
             targetSdkVersion 22

             // Enabling multidex support.
             multiDexEnabled true
         }
}

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)