Android Studio:3.4.1
还是在瞅easyExcel的时候,出现Duplicate class…found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)的问题。

问题

%title插图%num
Duplicate class org.apache.xmlbeans.xml.stream.Location found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)
Duplicate class org.apache.xmlbeans.xml.stream.ReferenceResolver found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)
Duplicate class org.apache.xmlbeans.xml.stream.XMLEvent found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)
Duplicate class org.apache.xmlbeans.xml.stream.XMLInputStream found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)
Duplicate class org.apache.xmlbeans.xml.stream.XMLName found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)
Duplicate class org.apache.xmlbeans.xml.stream.XMLStreamException found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)
Duplicate class org.apache.xmlbeans.xml.stream.utils.NestedThrowable found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)
Duplicate class org.apache.xmlbeans.xml.stream.utils.NestedThrowable$Util found in modules xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0) and xmlbeans-2.6.0.jar (org.apache.xmlbeans:xmlbeans:2.6.0)

Go to the documentation to learn how to Fix dependency resolution errors.

解决
疑似2.6.0的bug,在module级build.gradle文件的dependencies中增加xmlbeans3.1.0的依赖即可解决

compile group: ‘org.apache.xmlbeans’, name: ‘xmlbeans’, version: ‘2.6.0’

建议在android中增加multiDexEnable设置

multiDexEnable true

如下图:

%title插图%num

————————————————