我是新來的android工作室。 同時創建我的第一個Android應用程序。 它顯示了一些錯誤..Ubuntu的伴侶:Android Studio - Gradle項目同步失敗
Gradle sync started 11:00:29 AM Gradle sync failed: Process 'command '/home/db2admin/Downloads/android-studio/jre/bin/java'' finished with non-zero exit value 2
Consult IDE log for more details (Help | Show Log)
我的Java版本是
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)
OpenJDK Server VM (build 25.91-b14, mixed mode)
請幫我解決這個錯誤。
gradle-wrapper.properties包含
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-1.10-all.zip
應用程序/的build.gradle contaions
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.example.db2admin.myapplication"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:24.2.1'
testCompile 'junit:junit:4.12'
}
1)'更多details' 2)顯示完整的文件搖籃諮詢IDE日誌請 –
gradle-wrapper.properties#週三4月10日15時27分10秒PDT 2013 distributionBase = GRADLE_USER_HOME distributionPath =包裝/ dists中 zipStoreBase = GRADLE_USER_HOME zipStorePath = wrapper/dists distributionUrl = https \://services.gradle.org/distributions/gradle-1.10-all.zip –
gradle.properties contains org.gradle.jvmargs = -Xmx512m -XX:MaxPermSize = 512m –