Android Studio 2.2测试版无效

时间:2016-08-11 07:31:50

标签: android android-studio android-gradle

我刚刚下载了新版本的Android Studio 2.2 Beta,然后我创建了一个新项目并收到了错误消息。

错误讯息:

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

事件日志:

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 {
    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'
}

2 个答案:

答案 0 :(得分:0)

尝试检查编码系统是否UTF-8尝试在build.gradle项目和模块中将其更改为UTF-8

enter image description here

这可能会对你有所帮助

答案 1 :(得分:0)

在配置文件中添加

defaultConfig {        
    // Enabling multidex support.
    multiDexEnabled true
}

从gradle文件中删除 - testCompile'junit:junit:4.12'