由于此错误,我无法为Dalvik VM编译我的Android项目:
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
我想我以某种方式搞砸了我的导入,但这个类从未出现在我的导入中。
答案 0 :(得分:4)
我找到了问题here的答案。有时候,如果您只是使用eclipse中的修复项目设置功能。 Eclipse会将第二个安卓jar放入源代码树中。我在google库下找到了一个android.jar和另一个。我删除了一个并摆脱了错误。
答案 1 :(得分:2)
此错误不是由导入引起的,而是由代码引起的。您的构建要么具有java.awt.font.NumericShaper
的源代码,要么正在尝试加载具有java.awt.font.NumericShaper
的JAR。假设您没有将此代码放入源代码树中,请检查libs/
目录中的JAR(如果是Eclipse,则添加到构建路径中的任何内容)。
答案 2 :(得分:1)
我找到了解决方案:
在项目属性中,请确保在Java Build Path>中命令ans导出“android.jar”未选中。
希望有所帮助,