0
我有Android Studio中的一個問題,當我添加番石榴18.jar lib和運行我主我得到一個錯誤:錯誤:Gradle:執行任務':app:dexDebug'失敗。 > com.android.ide.common.process.ProcessException:
Error:Gradle: Execution failed for task ':app:dexDebug'.>
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2
我嘗試在build.gradle中加入這個
defaultConfig {
multiDexEnabled true
}
但是沒有解決。
請幫幫我!!!
我的gradle構建:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "it.unical.mat.myapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile files('libs/activation.jar')
compile files('libs/gdata-analytics-2.1.jar')
compile files('libs/gdata-core-1.0.jar')
compile files('libs/gdata-spreadsheet-3.0.jar')
compile files('libs/jsr305.jar')
compile files('libs/mail.jar')
compile files('libs/guava-18.0.jar')
}
在gradle文件中你需要添加編譯'com.android.support:multidex:1.0.0' –