简体   繁体   中英

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:

在此处输入图片说明

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM