Android Studio fails to debug with error org.gradle.process.internal.ExecException

Solution 1:

That is because you enabled multiDex for release builds only, not for debug builds.

Try this:

defaultConfig {
    multiDexEnabled true
}

Solution 2:

Try this

dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}

Solution 3:

Just see :: Configuring Your App for Multidex with Gradle on Android developer official docs