Android Studio运行独立kotlin文件注意事项
解决方案原文
Just update your androidx.test.ext:junit dependency to 1.1.3 or later. This should solve your problem.
build.gradle里把junit的版本从1.1.2改为1.1.3以上,不然运行会报错,改完记得右上角gradle sync一下
androidTestImplementation 'androidx.test.ext:junit:1.1.3'