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

可紊 提交于 2020-01-04 07:35:50

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/46590084/how-to-debug-or-resolve-error-the-current-project-can-not-be-run-for-run-conf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!