天天看點

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

原因:主要是你采用了第一種的android的測試方法擔憂沒有在AndroidManifest.xml中進行相應的配置。

解決辦法:在AndroidManifest.xml中的相應位置加上以下代碼即可:

<instrumentation
        android:name="android.test.InstrumentationTestRunner"
        android:targetPackage="com.njupt.junit1" />
<uses-library android:name="android.test.runner" />