Skip to content Skip to sidebar Skip to footer

Dexexception: Multiple Dex Files

Okay so currently i am making an Android app that utilizes the Google Sheets API version 3.0 and Drive API Client Library for Java, i need the app to read a spreadhsheet from a use

Solution 1:

Just clean the project and build again... I knew my code had nothing to do with the bug as soon as I saw the word 'dex' in the error text

Solution 2:

This error is caused by having too many method referenced in your project. You can read more here.

Generally it means that you need to remove unused libraries or use proguard even on debug build to reduce the number of method referenced. You may also go with the multi-dex approached mentioned in the article but it makes your project more complicated.

Solution 3:

I had react-native project with app's build.gradle:

defenableProguardInReleaseBuilds=false

...

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

Setting enableProguardInReleaseBuilds to true worked for me:

defenableProguardInReleaseBuilds=true

Post a Comment for "Dexexception: Multiple Dex Files"