由于处理“java/awt/font/NumericShaper.class”时出现问题,无法生成 apk

发布于 2024-08-23 13:57:52 字数 990 浏览 7 评论 0原文

由于此错误,我无法为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

·深蓝 2024-08-30 13:57:52

我在此处找到了问题的答案。似乎有时如果您只是使用 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.

你是年少的欢喜 2024-08-30 13:57:52

该错误不是由导入引起的,而是由代码引起的。您的构建要么具有 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 has java.awt.font.NumericShaper. Assuming you did not drop this code into your source tree, check the JARs in your libs/ directory (and, in the case of Eclipse, anything you added to your build path).

长途伴 2024-08-30 13:57:52

我找到了解决方案:

在您的项目属性中,请确保在 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,

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文