2011-08-02 8 views
0

私はアンドロイドとそれに対応するテストプロジェクトを作成しました。 AndroidのテストプロジェクトをAndroidのjunitテストとして実行すると両方の私のアンドロイドプロジェクトと私のアンドロイドテストプロジェクトは、Eclipseの下でコンパイルされます。実機でAndroidユニットテストプロジェクトを実行する際に助けが必要

私は実際の携帯電話で(私のラップトップに私の電話を接続し、EclipseとしてAndroidのjunitテストとして実行する)をクリックすると、私はこの 'instrumentation target package'を取得します。

[2011-08-02 14:33:36 - MyApp-test2] ------------------------------ 
[2011-08-02 14:33:36 - MyApp-test2] Android Launch! 
[2011-08-02 14:33:36 - MyApp-test2] adb is running normally. 
[2011-08-02 14:33:36 - MyApp-test2] Performing android.test.InstrumentationTestRunner JUnit launch 
[2011-08-02 14:33:36 - MyApp-test2] Automatic Target Mode: using device 'HT9BSP800010' 
[2011-08-02 14:33:36 - MyApp-test2] Application already deployed. No need to reinstall. 
[2011-08-02 14:33:36 - MyApp-test2] Project dependency found, installing: MyApp 
[2011-08-02 14:33:37 - MyApp] Application already deployed. No need to reinstall. 
[2011-08-02 14:33:37 - MyApp-test2] Launching instrumentation android.test.InstrumentationTestRunner on device HT9BSP800010 
[2011-08-02 14:33:37 - MyApp-test2] Collecting test information 
[2011-08-02 14:33:37 - MyApp-test2] Test run failed: Unable to find instrumentation target package: 

答えて

0

は私達にあなたのAndroidマニフェストファイルを表示、またはあなたがそれで、以下の持っていることを確認してください。

<manifest ..> 

<instrumentation 
     android:name="android.test.InstrumentationTestRunner" 
     android:targetPackage="YourTargetPkgNameHere" /> 

<application ...> 

<uses-library android:name="android.test.runner" /> 

</application> 

</manifest> 
+0

私はそれを持っています。そして、私はアンドロイドテストプロジェクトを再作成した後。そのエラーは消え去る。しかし、私はちょうど立ち往生しています[2011-08-03 16:00:36 - MyappTest]テスト情報の収集 [2011-08-03 16:00:37 - MyappTest] Eclipseへのテスト情報の送信 [2011-08-03 16:00:37 - MyappTest]テストの実行中... – michael

関連する問題