まだちょっとよく分かってないのですが、メモを残しておきます。
AndroidプロジェクトのlibディレクトリにいくつかJarファイルを追加して、実行しようとするとEclipseのコンソールに以下のようなメッセージが表示されてしまう現象なのですが、
と表示されていました。検索してみると、プロジェクトのクリーンがうまくいってない感じの記事がヒットします。
AndroidプロジェクトのlibディレクトリにいくつかJarファイルを追加して、実行しようとするとEclipseのコンソールに以下のようなメッセージが表示されてしまう現象なのですが、
[2013-10-09 21:59:20 - HogePj] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (org.htmlparser.beans.BeanyBaby$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class.同じようなエラーが、
- org.apache.commons.httpclient
- org.apache.commons.logging
[2013-10-09 22:06:17 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/htmlparser/util/SimpleNodeIterator; [2013-10-09 22:06:17 - HogePj] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/htmlparser/util/SimpleNodeIterator;
と表示されていました。検索してみると、プロジェクトのクリーンがうまくいってない感じの記事がヒットします。
・"Conversion to Dalvik format failed with error 1" の解決策 - 某ソフト作者の開発日記こちらのやり方を試してみましたが、ダメでした。
http://d.hatena.ne.jp/halts/20120516/1337170409
・java - Android - Apache commons libraries & Exchange Web Service Managed API - Stack Overflowこちらに、commons-httpは既に入ってるという風に書かれているのをヒントに、以下の対応を行いました。
http://stackoverflow.com/questions/8524208/android-apache-commons-libraries-exchange-web-service-managed-api
Ansdroid already contains commons-http (not sure which version is used, but it is 4 or better), so you have to ensure that your build process does not pack aleready contained jars into apk.
- htmlparser.jarとhtmllexer.jar → libsから別ディレクトリへ移動させ、ビルドパスへ外部JARとして適用
- commons-httpclient.jar → libsから削除
- commons-logging.jar → libsから削除
この対応で、プロジェクトをクリーンしてビルドすると警告等出なくなり、起動できました(゜∀。)
コメント
コメントを投稿