2010-03-05 48 views
2

我不能编译我的Android项目的Dalvik虚拟机,因为这种错误的APK:无法生成因为麻烦处理“爪哇/ AWT/FONT/NumericShaper.class”

trouble processing "java/awt/font/NumericShaper.class":Attempt to include a core VM class in 
something other than a core library. 
It is likely that you have attempted to include the core library from a desktop 
virtual machine into an application, which will most assuredly not work. If 
you really intend to build a core library -- which is only appropriate as 
part of creating a full virtual machine binary, as opposed to compiling an 
application -- then use the "--core-library" option to suppress this error 
message. If you go ahead and use "--core-library" but are in fact building 
an application, then please be aware that your build will still fail at some 
point; you will simply be denied the pleasure of reading this helpful error 
message. 
[2010-03-05 16:33:23 - Notepadv2]1 error; aborting 
[2010-03-05 16:33:23 - Notepadv2]Conversion to Dalvik format failed with error 1 

我想我以某种方式搞砸了我的进口,但这个类从来没有出现在我的进口。

回答

4

我找到了我的问题的答案here。有时候,如果你只是使用eclipse中的修复项目设置功能。 Eclipse会将第二个Android jar放到源代码树中。我在google库中找到了一个android.jar和另一个android.jar。我删除了一个并摆脱了错误。

2

此错误不是由导入引起的,它是由代码引起的。您的构建的源代码为java.awt.font.NumericShaper或正在尝试加载具有java.awt.font.NumericShaper的JAR。假设您没有将此代码放到源代码树中,请检查您的libs/目录中的JAR(以及Eclipse中的任何添加到构建路径的内容)。

1

我找到了解决办法:

在你的项目属性,一定要在Java构建路径>订单ANS出口的“的android.jar”没有被选中。

希望有帮助,