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'
}
}