当我运行我的android项目时,我收到以下错误::
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 3
我尝试了构建 - >清理项目但是徒劳无功。我尝试了#34;使用gradle文件同步项目"但是徒劳无功。我的 build.gradle 文件是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.sevenhorse.almabay"
// Enabling multidex support.
multiDexEnabled true
minSdkVersion 14
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.0.1'
compile 'com.google.code.gson:gson:2.2.+'
compile files('libs/google-api-client-1.19.0.jar')
//compile files('libs/google-api-client-android-1.19.0.jar')
compile files('libs/google-api-services-youtube-v3-rev124-1.19.0.jar')
compile files('libs/google-http-client-1.19.0.jar')
// compile files('libs/google-http-client-android-1.19.0.jar')
compile files('libs/google-http-client-jackson2-1.19.0.jar')
compile files('libs/google-oauth-client-1.19.0.jar')
compile files('libs/httpclient-4.3.6.jar')
compile files('libs/httpcore-4.3.3.jar')
compile files('libs/httpmime-4.3.6.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jsr305-1.3.9.jar')
compile files('libs/picasso-2.3.3.jar')
compile files('libs/universal-image-loader-1.6.1-with-src.jar')
compile files('libs/volley.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:multidex:1.0.0'
}
我也做了minifyEnabled,但没有工作。请帮我解决这个问题。
答案 0 :(得分:1)
不要直接将游戏服务包含到build.gradle
编译com.google.android.gms:播放服务:8.3.0'
仅使用您希望用于应用程序的游戏服务库模块
仅适用于应用的GCM和Google Analytics
编译com.google.android.gms:play-services-gcm:8.3.0'
compile' com.google.android.gms:play-services-analytics:8.3.0'