Maven を介して intelli-j アイデアの Android プロジェクトに Robotium テストを追加しようとしています。コンパイルしようとすると、次のエラーが発生します
Android Dex: [robotium] trouble processing "javax/xml/parsers/DocumentBuilder.class":
Android Dex: [robotium] Ill-advised or mistaken usage of a core class (java.* or javax.*)
Android Dex: [robotium] when not building a core library.
Android Dex: [robotium] This is often due to inadvertently including a core library file
Android Dex: [robotium] in your application's project, when using an IDE (such as
Android Dex: [robotium] Eclipse). If you are sure you're not intentionally defining a
Android Dex: [robotium] core class, then this is the most likely explanation of what's
Android Dex: [robotium] going on.
Android Dex: [robotium] However, you might actually be trying to define a class in a core
Android Dex: [robotium] namespace, the source of which you may have taken, for example,
Android Dex: [robotium] from a non-Android virtual machine project. This will most
Android Dex: [robotium] assuredly not work. At a minimum, it jeopardizes the
...
私がこれを解決しようとしたこと
1) Maven を介して Robotium を空のプロジェクトとサンプルの Robotium アプリに追加します。変化はありませんでした。
2)「プロジェクト構造」の下で、Robotium ライブラリのスコープを変更してみました。そのようにコンパイルすることはできましたが、 NoClassDefFoundError エラーが発生しました。私が欲しいものではありません。
3) 以前のバージョンの Robotium を使用してみました - 変化なし。
4) google を検索すると、次のように出くわしました。
Nov 14 01:32:50 <xastey> I asked this ealier but got sidetrack with other work so ....
I'm getting "trouble processing "javax/xml/parsers/DocumentBuilder.class" " while
trying to compile my project.. anyone ran into this problem?
...
Nov 14 01:37:01 <xastey> nvm.. had to remove com.google.android:android dependency
com.jayway.android.robotium:robotium-solo:4.3 から Maven クラスを調べると、インポートされます
android-4.0.1.2.jar
当然のことながら、私のプロジェクトには Android プラットフォームが既に含まれています。これが問題でしょうか?Androidプラットフォームが2回含まれていることは? これはまた、この仮説のサポートを示唆しているようですAndroid 4.0 Eclipse のコンパイルに失敗しました
もしそうなら、どうすればこれを修正できますか?IDE で maven インポートの jar ファイルを編集する方法はないようです。pom ファイルを手動で編集する必要がありますか? 私は依存関係にIDEを使用しただけなので、それ以上の知識/経験はほとんどありません。
もちろん、私はここで完全に間違った道を進んでいるのかもしれません。アドバイス/ご意見をいただければ幸いです。