包括Apache POI的Andr​​oid时,重复类错误 [英] Android duplicate class error when including Apache POI

查看:392
本文介绍了包括Apache POI的Andr​​oid时,重复类错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经得到了与Apache POI的问题练成API(XLSX)。我使用Android的工作室,我已经添加了POI库的库文件夹中。这个错误被弹出某种原因(见下文)。我将如何解决这个问题?能否请你解释你如何确定的问题?

XMLBeans的-2.6.0,POI-OOXML-架构 - 3.10.1-20140818,POI-OOXML-3.10.1-20140818,POI-3.10.1-20140818,log4j的-1.2.13,JUnit的4.11,DOM4J -1.6.1,共享记录-1.1,commons- codeC-1.5

谢谢!

我的build.gradle如下所示(不包括通用其他的东西)...


  

依赖性{
      编译文件树(包括:['的* .jar'],DIR:'库')}


  
  

安卓{
      packagingOptions {
          排除META-INF / LICENSE
          排除META-INF /注意事项
          排除META-INF / LICENSE.TXT
          排除META-INF / NOTICE.txt
      }}


我app.iml没有重复条目要么...

错误


  

错误:类org.apache.xmlbeans.xml.stream.Location已是
  加到输出。请删除重复的副本。编译器没
  针对现代.class文件格式。建议
  (org.apache.log4j.chainsaw.ControlPanel $ 1)不拿出一个
  相关EnclosingMethod属性。这个类可能是生产
  通过溶液是重新编译从源类,使用
  向上最新编译
      1错误;中止



解决方案

从Maven的中央XMLBeans的2.6 JAR包含一些重复的类的条目。 XMLBeans的JIRA有一个发出问题开。直到他们发布新的JAR,我想我要解压缩的jar,这将覆盖重复,然后重新压缩它,并把它放在我的库目录现在。

I've got a problem with the apache poi excel api (xlsx). I'm using android studio and I've added the poi libs to the "libs" folders. This error is popping up for some reason (see below). How would I solve it?, could you please explain how you identified the issue?

xmlbeans-2.6.0, poi-ooxml-schemas-3.10.1-20140818, poi-ooxml-3.10.1-20140818, poi-3.10.1-20140818, log4j-1.2.13, junit-4.11, dom4j-1.6.1, commons-logging-1.1, commons-codec-1.5

Thanks!

My build.gradle looks like the following (excluding the generic other stuff)...

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

android { packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' } }

My app.iml has no duplicate entries either...

Error

Error:Class org.apache.xmlbeans.xml.stream.Location has already been added to output. Please remove duplicate copies. compiler that did not target the modern .class file format. The recommended (org.apache.log4j.chainsaw.ControlPanel$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a solution is to recompile the class from source, using an up-to-date compiler 1 error; aborting

解决方案

The xmlbeans 2.6 JAR from Maven Central contains some duplicate class entries. The XMLBeans JIRA has an issue open for the problem. Until they publish a new JAR, I think I'm going to unzip the jar, which will overwrite the duplicates, then re-zip it up and put it in my libs dir for now.

这篇关于包括Apache POI的Andr​​oid时,重复类错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆