本文介绍了Android Maven构建给处理“javax / xml / namespace / QName.class”的麻烦:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我执行Project - > Clean时, Maven 控制台中显示以下错误。只有 jar 文件内置在目标文件夹中, apk 文件尚未构建。
任何人都可以帮我解决这个问题?



问候,



p>

我的开发环境是




  • Eclipse Helios

  • Android SDK API 8级

  • Eclipse ADT 10.0.1

  • 适用于Android开发工具的Maven集成0.2.5



4 / 30/11 9:54:07 PM IST:[INFO] skip non existing resourceDirectory D:\my\workspace\android\android-test-app\src\test\resources
4/30/11 9:54:07 PM IST:[INFO]不编译测试源
4/30/11 9:54:07 PM IST:[INFO]跳过测试。
4/30/11 9:54:07 PM IST:[INFO] D:\my\android-sdk-my\android-sdk-windows / platform-tools / dx.bat [ - dex,--output = D:\my\workspace\android\android-test-app\target\classes.dex,D:\my\workspace\android\android-test- app \target\android-classes]
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST:[INFO]麻烦处理javax / xml / namespace / QName.class:
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST :[INFO]不建议或错误地使用核心类(java。*或javax。*)
4/30/11 9:54:17 PM IST:[INFO]当不构建核心库时。
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST:[INFO]这通常是由于无意中包括一个核心库文件
4/30/11 9:54:17 PM IST:[INFO]在您的应用程序的项目中,当使用IDE(如
4/30/11 9:54:17 PM IST: [INFO] Eclipse)。如果你确定你不是故意定义一个
4/30/11 9:54:17 PM IST:[INFO]核心类,那么这是最可能的解释什么是
4/30 / 11 9:54:17 PM IST:[INFO]继续。
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST:[INFO]但是,你可能会试图定义一个一个核心的
4/30/11 9:54:17 PM IST:[INFO]命名空间,你可能已经采取的来源,例如
4/30/11 9:54 :17 PM IST:[INFO]来自非Android虚拟机项目。这将大部分
4/30/11 9:54:17 PM IST:[INFO]肯定不行。至少,它危及您的应用程序与未来版本的平台的
4/30/11 9:54:17 PM IST:[INFO]兼容性。
4/30/11 9:54:17 PM IST:[INFO]这也经常是有争议的合法性。
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST:[INFO]如果你真的打算建立一个核心库 - - 只有
4/30/11 9:54:17 PM IST:[INFO]适合作为创建一个完整的虚拟机的一部分
4/30/11 9:54:17 PM IST: [INFO]分发,而不是编译应用程序 - 然后使用
4/30/11 9:54:17 PM IST:[INFO]--core库选项来抑制此错误消息。
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST:[INFO]如果你继续使用--core图书馆但实际上是
4/30/11 9:54:17 PM IST:[INFO]构建一个应用程序,然后被预先警告你的应用程序
4/30/11 9:54: 17点IST:[INFO]在某些时候仍然无法建立或运行。请为
4/30/11 9:54:17 PM IST:[INFO]为愤怒的客户准备,例如找到您的
4/30/11 9:54:17 PM IST :[INFO]应用程序在升级运行后停止运行
4/30/11 9:54:17 PM IST:[INFO]系统。你将会怪这个问题。
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST:[INFO]如果你合法使用一些代码,在
4/30/11 9:54:17 PM IST:[INFO]核心包,那么最简单的安全替代方案是
4/30/11 9:54:17 PM IST:[INFO]重新打包该代码。也就是说,将有问题的类移动到
4/30/11 9:54:17 PM IST:[INFO]你自己的包命名空间。这意味着他们永远不会在
4/30/11 9:54:17 PM IST:[INFO]与核心系统类冲突。 JarJar是一个工具,可以帮助
4/30/11 9:54:17 PM IST:[INFO]你在这个努力。如果你发现你不能这样做,那么
4/30/11 9:54:17 PM IST:[INFO]这表明你的路径最终会
4/30 / 11 9:54:17 PM IST:[INFO]导致痛苦,痛苦,悲伤和哀悼。
4/30/11 9:54:17 PM IST:[INFO]
4/30/11 9:54:17 PM IST:[INFO] 1错误;中止

解决方案

如果您正在使用android maven集成,则应在您的Android sdk依赖关系中添加提供的范围。 p>

 <依赖关系> 
< groupId> com.google.android< / groupId>
< artifactId> android< / artifactId>
< version> 2.3.3< / version>
< scope>已提供< / scope>
< / dependency>


Following error is showing in Maven console everytime I do Project -> Clean. Only the jar file is built in the target folder, apk file is not getting built. Can anyone please help me to solve this issue?

Regards,

Sam.

My development environment is;

  • Eclipse Helios
  • Android SDK API level 8
  • Eclipse ADT 10.0.1
  • Maven Integration for Android Development Tools 0.2.5

4/30/11 9:54:07 PM IST: [INFO] skip non existing resourceDirectory D:\my\workspace\android\android-test-app\src\test\resources4/30/11 9:54:07 PM IST: [INFO] Not compiling test sources4/30/11 9:54:07 PM IST: [INFO] Tests are skipped.4/30/11 9:54:07 PM IST: [INFO] D:\my\android-sdk-my\android-sdk-windows/platform-tools/dx.bat [--dex, --output=D:\my\workspace\android\android-test-app\target\classes.dex, D:\my\workspace\android\android-test-app\target\android-classes]4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] trouble processing "javax/xml/namespace/QName.class":4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] Ill-advised or mistaken usage of a core class (java.* or javax.*)4/30/11 9:54:17 PM IST: [INFO] when not building a core library.4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] This is often due to inadvertently including a core library file4/30/11 9:54:17 PM IST: [INFO] in your application's project, when using an IDE (such as4/30/11 9:54:17 PM IST: [INFO] Eclipse). If you are sure you're not intentionally defining a4/30/11 9:54:17 PM IST: [INFO] core class, then this is the most likely explanation of what's4/30/11 9:54:17 PM IST: [INFO] going on.4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] However, you might actually be trying to define a class in a core4/30/11 9:54:17 PM IST: [INFO] namespace, the source of which you may have taken, for example,4/30/11 9:54:17 PM IST: [INFO] from a non-Android virtual machine project. This will most4/30/11 9:54:17 PM IST: [INFO] assuredly not work. At a minimum, it jeopardizes the4/30/11 9:54:17 PM IST: [INFO] compatibility of your app with future versions of the platform.4/30/11 9:54:17 PM IST: [INFO] It is also often of questionable legality.4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] If you really intend to build a core library -- which is only4/30/11 9:54:17 PM IST: [INFO] appropriate as part of creating a full virtual machine4/30/11 9:54:17 PM IST: [INFO] distribution, as opposed to compiling an application -- then use4/30/11 9:54:17 PM IST: [INFO] the "--core-library" option to suppress this error message.4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] If you go ahead and use "--core-library" but are in fact4/30/11 9:54:17 PM IST: [INFO] building an application, then be forewarned that your application4/30/11 9:54:17 PM IST: [INFO] will still fail to build or run, at some point. Please be4/30/11 9:54:17 PM IST: [INFO] prepared for angry customers who find, for example, that your4/30/11 9:54:17 PM IST: [INFO] application ceases to function once they upgrade their operating4/30/11 9:54:17 PM IST: [INFO] system. You will be to blame for this problem.4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] If you are legitimately using some code that happens to be in a4/30/11 9:54:17 PM IST: [INFO] core package, then the easiest safe alternative you have is to4/30/11 9:54:17 PM IST: [INFO] repackage that code. That is, move the classes in question into4/30/11 9:54:17 PM IST: [INFO] your own package namespace. This means that they will never be in4/30/11 9:54:17 PM IST: [INFO] conflict with core system classes. JarJar is a tool that may help4/30/11 9:54:17 PM IST: [INFO] you in this endeavor. If you find that you cannot do this, then4/30/11 9:54:17 PM IST: [INFO] that is an indication that the path you are on will ultimately4/30/11 9:54:17 PM IST: [INFO] lead to pain, suffering, grief, and lamentation.4/30/11 9:54:17 PM IST: [INFO] 4/30/11 9:54:17 PM IST: [INFO] 1 error; aborting

解决方案

If your are using android maven integration, you should add the "provided" scope in your android sdk dependency.

<dependency>        
<groupId>com.google.android</groupId>        
<artifactId>android</artifactId>        
<version>2.3.3</version>        
<scope>provided</scope>        
</dependency>

这篇关于Android Maven构建给处理“javax / xml / namespace / QName.class”的麻烦:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 01:30