Skip to content

Instantly share code, notes, and snippets.

@medyo
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save medyo/eb1f7a7e2bf49a609cb2 to your computer and use it in GitHub Desktop.
Save medyo/eb1f7a7e2bf49a609cb2 to your computer and use it in GitHub Desktop.
Solution: Unable to execute dex: Multiple dex files

This error means that there is a duplicated library used on one or many libraries.

To fix it, we should exclude them from our dependencies. On the build.gradle add the following line

dependencies {...}
configurations {
    all*.exclude group: 'x', module: 'library'
}

replace x with library to exclude for example:

configurations {
    all*.exclude group: 'com.nineoldandroids', module: 'library'
}

If you want to exclude it only from one library use the following

dependencies {
    compile (project(':myproject')){
      exclude group: 'x', module: 'library'
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment