java.lang.Exception: Custom runner class AndroidJUnit4 should have a public constructor with signature AndroidJUnit4(Class testClass)

前端 未结 5 2079
执念已碎
执念已碎 2021-01-03 21:19

gradle looks like:

apply plugin: \'com.android.application\'

android {
    compileSdkVersion 25
    buildToolsVersion \"25.0.2\"

    defaultConfig {
              


        
5条回答
  •  Happy的楠姐
    2021-01-03 21:42

    solution:- you have to change the test folder from test to androidTest and edit the test configuration.(or move the test file from test to androidTest edit the test configuration)

    I found the solution in this video: https://youtu.be/TGU0B4qRlHY?t=9m36s

    and here:- https://stackoverflow.com/a/30172064/5723125

提交回复
热议问题