在我的项目中,使用库MaterialDesign。当我还添加库 MPchart 时,我收到此错误并且不明白出了什么问题。谢谢你
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/nineoldandroids/animation/Animator$AnimatorListener;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
MaterialDesign 库的 build.gradle:
dependencies {
compile 'com.nineoldandroids:library:2.4.+'
compile 'com.android.support:support-v4:21.0.3'
}
和项目的 build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.nineoldandroids:library:2.4.+'
compile project(":MaterialDesign")
compile project(":MPChartLib")
compile files('libs/opencsv-2.4.jar')
}.
如果我删除依赖,我会得到其他错误。我能做些什么?