0

I Just downloaded the new version of Android Studio 2.2 Beta then I created a new project and got a error message.

Error message:

Error:Failed to complete Gradle execution. Cause: Process 'command '/home/beckondelve/Desktop/android-studio/jre/bin/java'' finished with non-zero exit value 2

Event log:

Gradle sync started
Gradle sync failed: Process 'command '/home/beckondelve/Desktop/android-studio/jre/bin/java'' finished with non-zero exit value 2 Consult IDE log for more details (Help | Show Log)

Gradle sync started
Gradle sync failed: Process 'command '/home/beckondelve/Desktop/android-studio/jre/bin/java'' finished with non-zero exit value 2
       Consult IDE log for more details (Help | Show Log)

Dependencies:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:23.4.0'
    testCompile 'junit:junit:4.12'
}
manfcas
  • 1,933
  • 7
  • 28
  • 47
Kanwar preet
  • 9
  • 1
  • 7
  • Your Gradle build is crashing. It's most likely not a problem with Android Studio. Unfortunately, there's not enough information to help you here. Please show more of the Gradle output with an [edit] and also include your build.gradle files – OneCricketeer Aug 11 '16 at 07:34
  • Check this thread http://stackoverflow.com/questions/27407855/android-studio-failed-to-complete-gradle-execution-cause-is-empty – Marco Santarossa Aug 11 '16 at 07:34
  • http://stackoverflow.com/questions/29756188/java-finished-with-non-zero-exit-value-2-android-gradle – piotrek1543 Aug 11 '16 at 08:06

2 Answers2

0

Try to check your encoding system if it isn't UTF-8 try to change it to UTF-8 in your build.gradle project and module

enter image description here

this may help you

0

Add this in your config file

defaultConfig {        
    // Enabling multidex support.
    multiDexEnabled true
}

Remove - testCompile 'junit:junit:4.12' from your gradle file