测试神器选择丢失/从构建变种Android Studio中2测试版5不见了 [英] Test Artifact selector missing/gone from Build Variants in Android Studio 2 Beta 5

查看:316
本文介绍了测试神器选择丢失/从构建变种Android Studio中2测试版5不见了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了从Android Studio中运行仪表测试,我通常选择Android电子仪器仪表测试作为测试工件待建,通过生成变种窗口。我最近升级到Android工作室2测试版5,测试神器选择不再可见。它去哪儿了?已经采取了一些其他的配置它的地方?

In order to run Instrumentation Tests from within Android Studio, I typically select "Android Instrumentation Tests" as the test artifact to be built, via the Build Variants window. I recently upgraded to Android Studio 2 Beta 5, and the "Test Artifact" selector is no longer visible. Where did it go? Has some other configuration taken its place?

推荐答案

我在Android版发行说明发现了这个工作室2.0 preVIEW 5 :经实验测试工件功能(其中两个单元测试和仪表测试是在IDE中同时启用)进行了改进进一步,现在默认启用

I discovered this in the release notes for Android Studio 2.0 Preview 5: "The experimental test artifacts feature (where both unit test and instrumentation tests are enabled simultaneously in the IDE) has been improved further and is now enabled by default."

要禁用的设备和仪器测试同步建设,去这里:文件菜单 - >设置 - >构建,执行,部署 - >构建工具 - >摇篮 - >实验。然后取消选择这样的:启用的Andr​​oid项目的所有测试工件(单元测​​试和仪表测试)

To disable the simultaneous building of unit and instrumentation tests, go here: File Menu -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Experimental. Then uncheck this: "Enable all test artifacts (Unit Test and Instrumentation Test) in Android projects".

而不是通过设置导航,您还可以使用搜索框设置对话框的顶部,只是搜索仪器。

Rather than navigate through Settings, you can also use the search box at the top of the Settings dialog, and just search for "instrumentation".

这篇关于测试神器选择丢失/从构建变种Android Studio中2测试版5不见了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆