score:59
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).
score:0
The problem is when you created the project, you would have had a AVD, so these configuration would be missing. My suggested way is first create the AVD and then create the android project :).
If you would have already created the project and if does not have much code you have written I would suggest to delete it and create a new one.
score:1
Besides ensuring that the below items are declared in the manifest of your test app, check in the Run Configuration that the "Instrumentation runner" field is set to
"com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner".
This what I ran into when figuring out why I test wouldn't run.
Manifest:
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="your.package"
android:label="your tests label" />
and...
<uses-library android:name="android.test.runner" />
score:2
It's not in your code, it's just eclipse is a little buggy. In your run configurations it could be trying to run a jUnit test, but select Run Application and that error will go away.
score:9
Just do a right click on your test class from eclipse IDE and click on "Run As". After this select "run Configuration" which will launch a Confiuration Window in eclipse and you need to click on the radio button next to the "Instrumentation Runner" and select the configured Instrumentation Runner from the drop down. Now click on apply and then click on Run . I think this will solve your problem.
Thanks, Smruti
score:18
One thing I noticed in this discussion that might be tripping some people up is that you need to make sure the "instrumentation" element in your manifest is a child of "manifest" and not of "application." (The examples here are correct, but this easy to mix up.)
http://developer.android.com/guide/topics/manifest/instrumentation-element.html
If you put your instrumentation stuff inside application, it won't be picked up, and your choices in the Eclipse ADT plugin for instrumentation runner may be blank. (But no error is thrown or shown, etc.)
score:111
You're probably missing the uses-library
and instrumentation
nodes in your AndroidManifest.xml
:
<manifest ...>
<application ...>
<!-- ... -->
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="your.package"
android:label="your tests label" />
</manifest>
Source: stackoverflow.com
Related Query
- Android Eclipse Plugin: Instrumentation Test Runner not specified
- Android Eclipse Plugin "reset adb" gives "Adb connection Error:EOF" error, not blocking, but what is it?
- android maven plugin does not get ANDROID_HOME env variable in Eclipse
- Eclipse android Maven : Plugin execution not covered by lifecycle configuration (execution: ndk- build, phase: compile)
- Java android - Eclipse plugin for notify when an activity is not registered?
- Android ADT Plugin for Eclipse not working after upgrading to ver 10.0
- Migrating from eclipse to Android studio "Error:(1, 0) Plugin with id 'com.android.application' not found"
- Eclipse Luna Android plugin sdk manager will not open.
- Android JNI Debug: Eclipse : Project specified in the launch configuration is not a C/C++ one
- Can not get Eclipse work with Android ADT plugin
- Eclipse not seeing test folder with Gradle plugin
- scala test eclipse plugin does not discover test resources
- Android Eclipse Plugin Not Working
- Not able to debug Android Instrumentation tests on Device from Eclipse
- Android Eclipse - Could not find *.apk
- Eclipse Android Plugin -- libncurses.so.5
- eclipse not showing Avd manager window and android project
- Eclipse Indigo - Cannot install Android ADT Plugin
- Profiling Android apps with Eclipse plugin TPTP instead of traceview
- How to reference javadocs to dependencies in Maven's eclipse plugin when javadoc not attached to dependency
- Eclipse "Enhanced Class Decompiler" plugin does not decompile when debugging
- Can't run JUnit 4 test case in Eclipse Android project
- How can I get Eclipse 2018.09 to use the JUnit 4 test runner by default?
- Installing ADT plugin in Eclipse for Android development
- Eclipse Android Emulator - Keyboard not working
- Web resources filtering with Maven war plugin does not work in Eclipse with m2e
- Plugin execution not covered by lifecycle configuration error in eclipse with pluginManagement in parent pom
- Eclipse with android plugin - Blocked at "calculating requirements and dependencies"
- Where can I find the source code for the Android Development Tools (ADT) plugin for the Eclipse IDE?
- Error "AdbCommandRejectedException: device not found" in Eclipse using Android emulator
More Query from same tag
- Eclipse ADT: Failed to create key, cannot allocate memory
- MapStruct with Gradle and eclipse is not working
- Eclipse Scout RAP UI deployment in Websphere
- Powermock and problem loading jar file file during unit test with JUnit 4 in eclipse
- Task priorities in Eclipse
- Error 401 Authorization required when pushing to github repository
- Unexpected Error in Eclipse
- Javafx Mediaview settings according to scene property
- Can Eclipse be used to generate the Scala inferred object type?
- Eclipse keeps wrapping my lines even though I have taken measures to prevent this
- Add JSON class folder and import in Java and Eclipse as IDE
- How do i add syntax highlighting in Eclipse for laravel blade files
- Eclipse text-search over all files?
- How can I include the java rxtx library into my Minecraft mod?
- TestNG Cannot find class in classpath
- Open AutoCompleteField on click
- log4j.properties configuration issues along with ant configuration
- Maven project not treated as a java project in eclipse
- Is developing an android/phonegap app with Netbeans IDE a good method?
- Eclipse e4 Context Menus
- deploying and testing rest-webservice with eclipse
- Where does eclipse publish(disk location) the web project?
- The import com.btr cannot be resolved
- Eclipse, many Syntax errors for .js file
- How do I re-factor references to static enum members
- Eclipse cannot shutdown BEA WebLogic server
- Mysql DB connection with JDBC freezing program
- Getting a java.lang.NoClassDefFoundError while executing my projects
- How to ignore a file already committed on GIT repository in Eclipse using EGit?
- increase and decrease gui not increasing not sure were im going wrong