does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare

在Android进行Junit单元测试的时候报以下错误:

[2015-04-06 20:26:21 - adtest] adtest does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml

是权限配置问题,需要在AndroidManifest.xml 加上2条配置信息:

<application>
     <uses-library android:name="android.test.runner" />
application>
    <instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.example.adtest">instrumentation>

你可能感兴趣的:(android)