Android Eclipse Plugin: Instrumentation Test Runner not specified

前端 未结 7 1317
抹茶落季
抹茶落季 2020-12-04 21:46

I\'m getting this error when trying to run unit tests from Eclipse with an Android Project. The list of Instrumentation Test Runners is empty in the Android preferences.

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 22:12

    In the Run Configuration you may have Android JUnit Test, if there are any new launch configuration entries inside this, you delete it and then run your application it will run.

    NOTE - This is likely to be the solution if you tried to run the test case before adding the correct lines to the manifest as described in the answer from Josef. If you have done this, delete the configuration (which will be complaining that no instrumentation test runner has been specified in its header) and then run it as an Android Junit Test again and it will create a valid configuration picking up the correct stuff that you have added to the manifest (see Josef's answer for this).

提交回复
热议问题