【发布时间】:2015-06-02 12:11:15
【问题描述】:
使用 gradle 构建 Android 项目。库 com.test.x 是从 nexus 获取的。在开发过程中,我想用我放在 libs 文件夹中的一个来覆盖 nexus 库。
在 gradle 构建文件中:
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.test:com.test.x:version'
我得到的错误:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.test.dex.DexException: Multiple dex files define Lcom/test/x/...;
似乎有问题,因为lib现在在项目中有两次?如何解决?还是有其他办法解决这个问题?
【问题讨论】:
标签: android gradle android-gradle-plugin