Error while running an app in Android Studio

Asked

Viewed 722 times

3

I imported a project from eclipse to Android Studio (version 1.3.2), until then all right, but an error occurred when I tried to run the program:

Error:Execution failed for task ':dexDebug'. com.android.ide.common.process.Processexception: 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 someone help me solve this problem?

  • Ever tried to update the version of Android Studio? the current version is 1.51.

  • 1

    To migrate the project also needs to be made some changes, take a look: http://answall.com/questions/47417/erro-ao-importproject-eclipse-paraandroid-studio

  • Yes, I tried to update, but it keeps giving the same error.

  • I have already created the project’s gradles files.

  • I would start by installing Java 7, which is the supported version of Android.

1 answer

0

Try the following:

in your project’s Gradle within the dependencies add:

dependencies {
 compile 'com.android.support:multidex:1.0.1'
}

inside android makes

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

 defaultConfig {
        multiDexEnabled true
    }
}

Then re-sync Gradle followed by a clean to the project.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.