我刚刚在 Android Studio 中创建了一个新项目,并希望将 UserVoice Java SDK 添加为依赖项。
我将该行添加compile 'com.uservoice:uservoice-java:0.0.2'
到依赖项块中的 app build.gradle 文件中。
当我尝试构建它时,构建会失败
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lorg/apache/commons/collections/Buffer;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
在这一点上,我还没有以任何方式修改项目。有没有办法排除有问题的依赖项并使 UserVoice SDK 工作?
谢谢!