Can't add JUnit to test and androidTest
问题 I need JUnit in both test folders. So I added androidTestCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12' But as soon as I add JUnit to the androidTest I cannot run the tests, because of the error thrownin this log. Any ideas on how to fix this problem? EDIT: I removed the gradle-aware build from the run configuration. Now it says that my TestSuite is empty, but there are tests annotated with @Test 回答1: Hava a try with this in your build.gradle file dependencies { androidTestCompile(