Compile multDex error

Asked

Viewed 27 times

0

I’m having compilation problem I’ve seen several topics here I tried td but, it doesn’t work, I also tried several combinations but it won’t. Obs: I’ve tried to td that there is here in the forum!!!

Error

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v7/util/ThreadUtil$MainThreadCallback;

Gradle app

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId "br.android.welyson"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 3
        versionName "1.0.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.google.android.gms:play-services-drive:11.0.4'
    compile project(':cheetah-mobile-3.4.7')
    //compile 'com.google.android.gms:play-services-ads:11.0.4'
    //compile 'com.google.android.gms:play-services-location:11.0.4'
    //compile 'com.google.firebase:firebase-messaging:11.0.4'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}


//apply plugin: 'com.google.gms.google-services'
  • Have a look at this link : https://developer.android.com/studio/build/multidex.html?hl=pt-br If you follow these steps, try to add the settings you gave as your answer to this question https://stackoverflow.com/questions/28031860/implementing-multidex-Results-in-compiling-for-so-long-and-Finally-heap-space-e together with the changes from the previous link

  • This leads to other mistakes

  • Read carefully and followed the steps of the site "Developer.android"?

  • try to clean up the project Build>Clean Project

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.