为什么依赖jdk的库在编译APK?

时间:2017-03-10 04:04:12

标签: android android-studio gradle compiler-errors openjdk

所有:    我想在工作中使用杰克逊。    像gradle这样导入它:

compile('com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.8.5') 
compile 'javax.xml.stream:stax-api:1.0-2'

所以,我得到了这样的错误:

 Error:trouble processing "javax/xml/stream/EventFilter.class":
 Error:Ill-advised or mistaken usage of a core class (java.* or javax.*)
 Error:when not building a core library.
 Error:This is often due to inadvertently including a core library file
 Error:in your application's project, when using an IDE (such as
 Error:Eclipse). 

我发现这个类是在rt.jar(open-jdk' s jre的一部分)中实现的,我也发现android studio依赖它默认如下:    enter image description here    如何禁用这个jdk依赖?

0 个答案:

没有答案