I know this is a stupid question, but I was just stuck with this:
1. I have one main project called MainProject. 2. Inside there is one test project that has its own source and manifest file, and in the manifest file I have added everything necessary to make it a test project as follows:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app.tests" android:versionCode="1" android:versionName="1.0"> <application> <uses-library android:name="android.test.runner" /> </application> <uses-sdk android:minSdkVersion="3" /> <instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.example.app" android:label="Tests for My App" /> </manifest>
Now I right-click on it, going to “Run As” and “Run Configuration” and select “Android JUnit Test”, but it shows an error:
MainProject does not indicate the android.test.InstrumentationTestRunner toolkit or declare the use of-library android.test.runner in its AndroidManifest.xml
Any help plz?
There is one @Lucifer video link below which is useful, as well as my own answer, to which you can check the link, which is also useful.
source share