Gradle: How to exclude javax.realtime package from JScience jar dependency (Multiple dex define)
问题 I'm using Gradle in my Android application an I would like to use the JScience library dependency. I have added the library this way: dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile 'org.jscience:jscience:4.3.1' testCompile group: 'junit', name: 'junit', version: '4.11' } But in the compile time I get the error: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Ljavax/realtime/MemoryArea; at com.android.dx.merge.DexMerger