Android : Apache POI duplicate entry: org/apache/xmlbeans/xml/stream/Location.class error

前端 未结 5 1610
庸人自扰
庸人自扰 2020-12-12 02:29

Hi I am getting following error while running my android project :

Error:Execution failed for task \':app:transformClassesWithJarMergingForDebug\'.
> com.         


        
5条回答
  •  失恋的感觉
    2020-12-12 02:51

    After doing some other reading I found out there are issues with using poi library in android, see link below :

    https://bz.apache.org/bugzilla/show_bug.cgi?id=59268#c0

    Project at https://github.com/andruhon/android5xlsx has reduced library versions for both poi.jar & poi-ooxml.jar, import these in your libs folder & include following code in your gradle :

    compile fileTree(include: ['*.jar'], dir: 'libs')
    

    The reason this works is the guy who has created this project has excluded the xmlbeans.jar from basic poi.jar with which android build has problem. Credit goes to the guy andruhon.

    This workaround worked for me hence posting as answer

提交回复
热议问题