Deepak Rattan
Deepak Rattan

Reputation: 1299

Execution failed for task : app:dexDebug

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

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

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

Upvotes: 0

Views: 75

Answers (1)

JItesh SUvarna
JItesh SUvarna

Reputation: 663

Don't include play services directly to build.gradle

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

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

For only GCM and Google Analytics for a app

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

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

Upvotes: 1

Related Questions