Mahesh Vayak
Mahesh Vayak

Reputation: 1106

Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug' in Android Studio 3.0.1

I have got error while debug app running

Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'. > com.android.build.api.transform.TransformException: java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files

I have tried it but I got the same error every time.

defaultConfig {
    applicationId "com.xxx.xxx.xxx"
    minSdkVersion 16
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    vectorDrawables.useSupportLibrary = true
    manifestPlaceholders = [appPackageName: "${applicationId}"]
}

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

dependencies {
  implementation 'com.android.support:multidex:1.0.2'
}

Upvotes: 0

Views: 4635

Answers (2)

Iraj Teimoori
Iraj Teimoori

Reputation: 1

When i was cleaned my project this issue was solved.

Clean Project

Upvotes: 0

coder_baba
coder_baba

Reputation: 402

Hi As per myUnderstanding, Follow this type build on your project

And change your local.properties with this

org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m




android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.xxxx.xxxx"
    minSdkVersion 21
    targetSdkVersion 26
    versionCode 7
    versionName "0.7"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}

buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

Upvotes: 3

Related Questions