2

次のエラーのため、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

どういうわけかインポートを台無しにしたと思いますが、このクラスは私のインポートでは決して発生しません。

4

3 に答える 3

4

ここで私の問題に対する答えを見つけました。Eclipse の修正プロジェクト設定機能を単に使用すると、時々そう思われます。Eclipse は 2 つ目の Android jar をソース ツリーにドロップします。Google ライブラリの下に 1 つの android.jar と別の 1 つが見つかりました。1つ削除して、エラーを取り除きました。

于 2010-03-05T16:41:39.690 に答える
2

このエラーはインポートが原因ではなく、コードが原因です。ビルドには、へのソースコードがあるjava.awt.font.NumericShaperか、。を持つJARをロードしようとしていjava.awt.font.NumericShaperます。このコードをソースツリーにドロップしなかったと仮定して、libs/ディレクトリ内のJAR(および、Eclipseの場合は、ビルドパスに追加したもの)を確認します。

于 2010-03-05T16:04:16.710 に答える
1

私は解決策を見つけました:

プロジェクトのプロパティで、[Java Build Path] > [Order ans Export] で「android.jar」がオフになっていることを確認してください。

それが役立つことを願って、

于 2012-12-18T15:19:51.930 に答える