私はあなたが1月以来それを解決していると思いますが、私はコマンドラインツールで動作し、同様の問題が見つかりました(エラーメッセージはdifferenですt)、それを次のステップで説明するように解決しました。私は空のテストでダミーのプロジェクトを作成してからテストを成功させるまでの全過程を行います。、ステップ
android create project
--name MyExample
--target "Google Inc.:Google APIs:17"
--path MyExample
--package com.example
--activity MyExampleActivity
第二ステップ:プロジェクトを作成し、
まずステップ:私はそれが誰かのために役立ちます願っていますプロジェクトディレクトリにアクセスしてビルドし、プロセスが正常に終了することを確認してください:
cd MyExample && ant debug
第四ステップ、エミュレータにインストール:
adb -s emulator-5554 install -r bin/MyExample-debug.apk
第五ステップ、テストプロジェクトディレクトリへのアクセスおよびテストを実行しよう:
cd ../MyExampleTest &&
adb shell am instrument -w com.example.tests/android.test.InstrumentationTestRunner
収率:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.example.tests/android.test.InstrumentationTestRunner}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: com.example.tests/android.test.InstrumentationTestRunner
at com.android.commands.am.Am.runInstrument(Am.java:676)
at com.android.commands.am.Am.run(Am.java:119)
at com.android.commands.am.Am.main(Am.java:82)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
第六ステップ、あなたの計装clasesを一覧表示し、現在のプロジェクトが欠落していることを確認します。com.example.tests
doesnのための計装、あなたが見ることができるように
instrumentation:com.android.emulator.connectivity.test/android.test.InstrumentationTestRunner (target=com.android.emulator.connectivity.test)
instrumentation:com.android.emulator.gps.test/android.test.InstrumentationTestRunner (target=com.android.emulator.gps.test)
instrumentation:com.android.example.spinner.tests/android.test.InstrumentationTestRunner (target=com.android.example.spinner)
instrumentation:com.android.smoketest.tests/com.android.smoketest.SmokeTestRunner (target=com.android.smoketest)
instrumentation:com.android.smoketest.tests/android.test.InstrumentationTestRunner (target=com.android.smoketest)
instrumentation:com.example.android.apis/.app.LocalSampleInstrumentation (target=com.example.android.apis)
:私のマシン利回りの
adb shell pm list instrumentation
こと存在しないので、私たちはそれを作成しなければなりません。
第七ステップ、あなたのテストプロジェクトを構築し、それが成功したことを確認してください。
ant debug
8番目のステップを、エミュレータにインストール:
adb -s emulator-5554 install -r bin/MyExampleTest-debug.apk
第9工程を、計測クラスをリストし、プロジェクトの1つを探します:
その利回りadb shell pm list instrumentation
:
instrumentation:com.android.emulator.connectivity.test/android.test.InstrumentationTestRunner (target=com.android.emulator.connectivity.test)
instrumentation:com.android.emulator.gps.test/android.test.InstrumentationTestRunner (target=com.android.emulator.gps.test)
instrumentation:com.android.example.spinner.tests/android.test.InstrumentationTestRunner (target=com.android.example.spinner)
instrumentation:com.android.smoketest.tests/com.android.smoketest.SmokeTestRunner (target=com.android.smoketest)
instrumentation:com.android.smoketest.tests/android.test.InstrumentationTestRunner (target=com.android.smoketest)
instrumentation:com.example.tests/android.test.InstrumentationTestRunner (target=com.example)
instrumentation:com.example.android.apis/.app.LocalSampleInstrumentation (target=com.example.android.apis)
続く2番目を見て、instrumentation:com.example.tests
、それは我々が望んでいたたのです。
第10工程、実行し、あなたのテスト:
adb shell am instrument -w com.example.tests/android.test.InstrumentationTestRunner
もたらすこと:
Test results for InstrumentationTestRunner=
Time: 0.0
OK (0 tests)
すべてです。今度はテストを実装し、いつものようにコンパイルしてインストールしてください。さらに、次のように削除することもできます。
adb shell pm uninstall com.example.tests
しかし、同じエラーを避けるためには、計測器クラスを再度作成する必要があります。
をアンインストールした後、テストを再インストールするか、キックオフはあなたにBireiありがとう、ありがとう、ありがとう! 私は "Instrumentation Infoを見つけることができませんでした"というエラーが表示されていたので、インストールのアクションで問題が解決しました – gsaslis
あなたの方法でチェックしましたが、まったく動作しません。そしてもう一つはもっともっと6番目のステップで私は計測器リストで私のプロジェクトの名前を見ることができますが、テストを実行しようとしているときに上記のようにエラーが出ます。私を助けてください。 –
あなたはgradleと似た何かをしましたか? – c3rin