I had a similar problem, but I couldn’t even build using gradle, since that would give me "Unable to open the debugger port (127.0.0.1:xxxxx):" when it hit a specific subproject
What I found was a special character used in char char degreeSymbol = '°'; which caused the failure, and why it could not open the debugger port.
In the verification folder there is a gradle task called "test" that will find this problem and show you exactly where.
In IntelliJ community edition 2016.2, you can find this by going to View> Windows Tool> Gradle. Then expand the project name (root)> tasks> check.
To fix the problem, either change the special character to unicode final String DEGREE = "\u00b0"; or in the root directory of Gradle.build do:
apply plugin: 'java' compileJava { options.encoding = "UTF-8" }
or if you have several subprojects:
allprojects { apply plugin: 'java' compileJava { options.encoding = "UTF-8" } }
source share