I need to run debug while my tests execution in Android Studio + Robolectric. Each time I try to run them by selecting debug for the test task from
debug
test
I was getting this error on linux, and the problem was that the another previous process has taken the port and hung. So, the solution is a netstat to locate the process blocking the port, then kill this process, or you can restart the machine.