android studio beta5,在Android Studio 2 Beta 5中,从Build Variants中删除/删除测试工件选择器(Test Artifact selector m...

在Android Studio 2 Beta 5中,从Build Variants中删除/删除测试工件选择器(Test Artifact selector missing/gone from Build Variants in Android Studio 2 Beta 5)

为了在Android Studio中运行Instrumentation Tests,我通常通过Build Variants窗口选择“Android Instrumentation Tests”作为待构建的测试工件。 我最近升级到Android Studio 2 Beta 5,“Test Artifact”选择器已不再可见。 哪里去了? 有其他配置取代了吗?

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?

原文:https://stackoverflow.com/questions/35708263

更新时间:2019-09-28 05:05

最满意答案

我在Android Studio 2.0 Preview 5的发行说明中发现了这一点:“实验测试工件功能(在IDE中同时启用单元测试和仪器测试)已经进一步改进,现在默认启用 。

要禁用同时构建单元和仪器测试,请转到:文件菜单 - >设置 - >构建,执行,部署 - >构建工具 - > Gradle - >实验。 然后取消选中:“启用Android项目中的所有测试工件(单元测​​试和仪器测试)”。

而不是浏览设置,您也可以使用设置对话框顶部的搜索框,并搜索“检测”。

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."

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".

2016-02-29

相关问答

首先使缓存无效并重新启动,然后清理项目并重建它.hop有帮助。 First Invalidate caches and restart, then clean the project and rebuild it .hope it helps.

根据这个当前未决问题 : 根据升级时出现的帮助> Android Studio新增功能屏幕: “导航编辑器是一个实验性功能,因此您必须先打开IDE的”设置/首选项“对话框,在左侧窗格中选择”体验“,然后选中”启用导航编辑器“旁边的框来启用它。” 我们将更新导航文档以明确地表明这一点。 在未来的Canary版本(Android Studio 3.3)可用时,它也会默认启用。 因此,您需要在Android Studio 3.2的Beta版本上手动启用导航编辑器 Per this currently o

...

我在Android Studio 2.0 Preview 5的发行说明中发现了这一点:“实验测试工件功能(在IDE中同时启用单元测试和仪器测试)已经进一步改进,现在默认启用 。 要禁用同时构建单元和仪器测试,请转到:文件菜单 - >设置 - >构建,执行,部署 - >构建工具 - > Gradle - >实验。 然后取消选中:“启用Android项目中的所有测试工件(单元测试和仪器测试)”。 而不是浏览设置,您也可以使用设置对话框顶部的搜索框,并搜索“检测”。 I discovered this

...

我在'Android'视图的'CPU'标签下找到了它: “CPU”视图与“内存”视图一起在AS 1.2预览版2中添加 。 I've found it under the 'CPU' tab in the 'Android' view: The 'CPU' view was added in the AS 1.2 Preview 2 along with the 'Memory' view.

这个是正常的。 它没有将每个模块显示为不同的构建变体,它向您显示项目中的每个模块,并允许您选择要为该单个模块构建的构建变体。 实际构建变体可在该视图的右侧列中选择。 This is normal. It isn't showing each module as a different build variant, it's showing you each module in your project and allowing you to choose which build variant y

...

问题是Android Studio的版本,它是1.0.1我更新到1.2.2并且问题得到解决 The problem was the version of Android Studio, it was 1.0.1 I updated to 1.2.2 and the problem is fixed

Gradle上一个测试版的链接 : 链接 对于测试版本,将jcenter()添加为存储库: buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:1.5.0-beta1'

}

}

顺便说一句,你可以使用这样的稳定版本: classpath 'com.android.tools.buil

...

它需要是classpath 'com.android.tools.build:gradle:2.0.0-beta1' 这是Android Studio在应用更新后出现的以下对话框中使用“修复插件版本和同步项目”选项后更新的值: 作为旁注,很高兴看到Android Studio 2.0已经转移到Beta! 编辑: 好吧,Beta 2出现并没有多久。 由于我昨天才回答这个问题,所以我会更新答案以防其他人偶然发现。 classpath 'com.android.tools.build:gradle:2.

...

如果您下载了android-studio-ide-135.1538390-windows ,那么它只包含IDE而不是Android SDK。 您需要单独下载: http://dl.google.com/android/installer_r23.0.2-windows.exe 链接 然后,您将Android Studio指向SDK安装位置。 If you downloaded android-studio-ide-135.1538390-windows, then it only contains

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值