4

我正在尝试在 Android Studio 0.2.5 上构建一个 Android Maven 项目
当我使用命令行构建时没关系

mvn clean install

但是,当按下 Android Studio 工具栏上的“制作项目”时。我有这个错误

Android Pre Dex: [xpp3-1.1.4c.jar] trouble processing "javax/xml/namespace/QName.class":
Android Pre Dex: [xpp3-1.1.4c.jar] Ill-advised or mistaken usage of a core class (java.* or javax.*)
Android Pre Dex: [xpp3-1.1.4c.jar] when not building a core library.
Android Pre Dex: [xpp3-1.1.4c.jar] This is often due to inadvertently including a core library file
Android Pre Dex: [xpp3-1.1.4c.jar] in your application's project, when using an IDE (such as
Android Pre Dex: [xpp3-1.1.4c.jar] Eclipse). If you are sure you're not intentionally defining a
Android Pre Dex: [xpp3-1.1.4c.jar] core class, then this is the most likely explanation of what's
Android Pre Dex: [xpp3-1.1.4c.jar] going on.
Android Pre Dex: [xpp3-1.1.4c.jar] However, you might actually be trying to define a class in a core
Android Pre Dex: [xpp3-1.1.4c.jar] namespace, the source of which you may have taken, for example,
Android Pre Dex: [xpp3-1.1.4c.jar] from a non-Android virtual machine project. This will most
Android Pre Dex: [xpp3-1.1.4c.jar] assuredly not work. At a minimum, it jeopardizes the
Android Pre Dex: [xpp3-1.1.4c.jar] compatibility of your app with future versions of the platform.
Android Pre Dex: [xpp3-1.1.4c.jar] It is also often of questionable legality.
Android Pre Dex: [xpp3-1.1.4c.jar] If you really intend to build a core library -- which is only
Android Pre Dex: [xpp3-1.1.4c.jar] appropriate as part of creating a full virtual machine


在 pom.xml 中,我设置了 coreLibrary = true
这是一个 pom.xml 的路径,其中 config android-maven-plugin https://gist.github.com/lenamuit/30bfee3069b283f79cc4
如果你有解决方案,请帮忙我?太感谢了。

2013/08/21 更新:
我找到了解决方案。我在 pom.xml 中使用了这段代码。 https://gist.github.com/lenamuit/6290610

4

0 回答 0