Skip to content Skip to sidebar Skip to footer

Execution Failed For Task After Updating Android Studio To 3.0

When I updated my Android Studio 3.0, I get an error unable to merge with dex. Then I added mutiDexEnabled true and also added com.android.support:multidex:1.0.1 in build.gradle.

Solution 1:

Try delete build folder of app than Clean-Rebuild-Run your Project. if not work than do Invalidate Caches/Restart.

Happy coding!!


Solution 2:

Once try these steps,

Step 1: Delete all the build and the .gradle folder,

Step 2: Add the below code in your gradle.properties,

 android.enableAapt2=false

Step 3: Then Sync your android project.


Solution 3:

Try buildToolsVersion "26.0.0" and then just restart Android Studio.


Solution 4:

You don't need to add jar files for Play services when you adding dependencies

remove this from your Build.Gradle

implementation files('libs/google-play-services.jar')

than Clear-Rebuild-Run your Project


Solution 5:

You should not work with librairies that end with + . You should specify a version. implementation 'com.google.android.gms:play-services:+' should be

implementation 'com.google.android.gms:play-services:11.4.2'

then build.gradle will be :

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.2'

    defaultConfig {
        applicationId "com.copperseeds.android.kunjachamman.applicationin.budget"
        minSdkVersion 14
        targetSdkVersion 26
        multiDexEnabled true
    }


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
        }
    }

}



dependencies {
    implementation files('libs/ksoap2-android-assembly-2.6.0-jar-with-dependencies.jar')
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    implementation 'com.android.support:appcompat-v7:26.0.0'
    implementation 'com.android.support:support-annotations:26.0.0'
    implementation 'com.android.support:support-v4:26.0.0'
    implementation 'com.github.navasmdc:MaterialDesign:1.5@aar'
    testImplementation 'junit:junit:4.12'
    implementation project(':ORMDroid')
    implementation project(':FacebookSDK')
    implementation project(':standOut')
    implementation files('libs/gcm.jar')
    implementation files('libs/google-play-services.jar')
    implementation 'com.google.android.gms:play-services:11.4.2'
    compile 'com.android.support:multidex:1.0.1'    
}

Post a Comment for "Execution Failed For Task After Updating Android Studio To 3.0"