任务执行失败:app:dexDebug [英] Execution failed for task : app:dexDebug

查看:194
本文介绍了任务执行失败:app:dexDebug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行我的android项目时,出现以下错误:

When I am running my android project I got the following error::

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

我尝试了 Build->清理项目,但徒劳。Alos我尝试了用gradle文件同步项目,但徒劳。我的 build.gradle 文件是:

I tried Build->Clean Project but in vain.Alos i tried "Sync project with gradle files" but in vain .My build.gradle file is :

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,但没有用。请帮助我解决此问题。

I have also done minifyEnabled true but not working.Please help me to fix the issue.

推荐答案

不要将播放服务直接包含到build.gradle

Don't include play services directly to build.gradle

编译'com.google.android.gms:play-services:8.3.0 '

compile 'com.google.android.gms:play-services:8.3.0'

仅使用您想要用于应用程序的播放服务库模块

Use only those modules of play services lib that you want for your application

仅适用于GCM和Google应用的分析

For only GCM and Google Analytics for a app

编译'com.google.android.gms:play-services-gcm:8.3.0'

compile 'com.google.android.gms:play-services-gcm:8.3.0'

编译'com.google.android.gms:play-services-analytics:8.3.0'

compile 'com.google.android.gms:play-services-analytics:8.3.0'

这篇关于任务执行失败:app:dexDebug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆