我正在尝试在Andoid Studio中运行一些单元测试.在"运行配置"选项卡中,我已将其设置为使我的JUnit在整个项目中搜索测试.我的JRE配置为1.8,我已启用代码覆盖率.但是,每次我尝试运行测试时,都会出现以下"IDE致命错误":
Unable to determine list of modules to build java.lang.IllegalStateException: Unable to determine list of modules to build at com.android.tools.idea.gradle.run.MakeBeforeRunTaskProvider.createBuilder(MakeBeforeRunTaskProvider.java:357) at com.android.tools.idea.gradle.run.MakeBeforeRunTaskProvider.executeTask(MakeBeforeRunTaskProvider.java:255) at com.android.tools.idea.gradle.run.MakeBeforeRunTaskProvider.executeTask(MakeBeforeRunTaskProvider.java:86) at com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:317) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
我试图谷歌一个解决方案,这个线程接近:Android Studio插件Android支持中的NullPointerExcepton,但我的SDK和插件是最新的,并没有真正解决它.
谢谢