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

前端 未结 5 1608
庸人自扰
庸人自扰 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 03:09

    The poi library has dependancy clashes with multidex apk build. To fix these clashes:

    1. Remove gradle reference to the dependancy or jar [as bellow].
    2. Add this jar without clashing dependancies to /lib
    3. Add the following line to module gradle:

      //    implementation 'org.apache.poi:poi-ooxml:3.17'
      

      implementation files('libs/poishadow-all.jar')

    4. You can also right click the jar and choose add as library which will do this automatically

    The jar was built from This Github repository

提交回复
热议问题