janpio
janpio

Reputation: 10902

How to debug or resolve "Error: The current project can not be run" for Run Configuration for Android Instrumented Tests?

I have a project (created via this StackOverflow question) that has a module with an Android Instrumented Test. It can be run via a normal Configuration where the module is selected.

This works for Android Gradle plugin <=2.2.3 and >=3.0.0-beta1. But as soon as I change the project to Android Gradle project 2.3.x (2.3.0 -> 2.3.3) I get this error message for my run configuration:

enter image description here

I found no way to get more information or debug this error message in any way. There is nothing highlighted in this window or anywhere else.

Any idea what could be causing this? How can I debug this error message to find out what is wrong with my project?

Upvotes: 2

Views: 3849

Answers (1)

The Riddler
The Riddler

Reputation: 107

Try running the Instrumented tests from the command line in Android Studio. The command is ./gradlew connectedAndroidTest . This should give you an indication of what's going on.

Also, make sure that you have an emulator running or a device plugged in.

Upvotes: 2

Related Questions