Error running an app in Android Studio


I imported a project from eclipse to Android Studio (version 1.3.2), so far so good, but there was an error when I tried to run the program:

Error:Execution failed for task ':dexDebug'. org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_73\bin\java.exe'' finished with non- zero exit value 2

Can anyone help me solve this problem?


Try this:

on the gradle of your project within dependencies add:

dependencies {
 compile ''

inside android does

android {
 dexOptions {
        preDexLibraries = false
        incremental true
        javaMaxHeapSize "4g"

 defaultConfig {
        multiDexEnabled true

Then the gradle is synchronized again, followed by a clean to the project.

Scroll to Top