不能在Android Studio 0.2.5上“制作项目”Android Maven

时间:2013-08-19 08:26:54

标签: android maven intellij-idea android-studio

我正在尝试在Android Studio 0.2.5上构建Android Maven项目
当我使用命令行构建

时,这是可以的
mvn clean install

但是,当在Android Studio工具栏上按“make project”时。我有这个错误

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

0 个答案:

没有答案