由于处理“java/awt/font/NumericShaper.class”时出现问题,无法生成 apk
由于此错误,我无法为 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
我认为我以某种方式弄乱了我的导入,但此类从未出现在我的导入中。
I can't compile my Android project for the Dalvik VM because of this error:
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
I think I somehow messed up my imports but this class never occurs in my imports.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在此处找到了问题的答案。似乎有时如果您只是使用 Eclipse 中的修复项目设置功能。 Eclipse 会将第二个 android jar 放入您的源代码树中。我在谷歌库下找到了一个 android.jar 和另一个。我删除了一个并消除了错误。
I found the answer to my problem here. It seems that sometimes if you simply use the fix project setup feature from eclipse. Eclipse will drop a second android jar into your source tree. I found a single android.jar and another one under google libraries. I removed one and got rid of the error.
该错误不是由导入引起的,而是由代码引起的。您的构建要么具有
java.awt.font.NumericShaper
的源代码,要么尝试加载具有java.awt.font.NumericShaper
的 JAR。假设您没有将此代码放入源代码树中,请检查libs/
目录中的 JAR(如果是 Eclipse,则检查添加到构建路径中的所有内容)。This error is not caused by imports, it is caused by code. Your build either has the source code to
java.awt.font.NumericShaper
or is attempting to load a JAR that hasjava.awt.font.NumericShaper
. Assuming you did not drop this code into your source tree, check the JARs in yourlibs/
directory (and, in the case of Eclipse, anything you added to your build path).我找到了解决方案:
在您的项目属性中,请确保在 Java Build Path >命令 ans Export 取消选中“android.jar”。
希望有帮助,
I found the solution :
In your project properties, be sure in Java Build Path > Order ans Export that the "android.jar" is unchecked.
Hope that helps,