Android Studio更新到2.0以后,在build variants窗口下没有 test artifact选项,无法选择是Android Instrumentation Tests还是Unit Tests,如下图。
Google一下,解决方案是依次打开: File Menu -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Experimental,
将Enable all test artifacts (Unit Test and Instrumentation Test) in Android projects取消勾选,之后我们熟悉的Test Artifact就出现了,如下图
本文介绍了如何在Android Studio 2.0中解决缺少TestArtifact选项的问题,通过调整Gradle设置来启用单元测试和Android Instrumentation Tests。
1532

被折叠的 条评论
为什么被折叠?



