Android Studio将目录标记为测试源根 [英] Android Studio Mark Directory as Test Sources Root

查看:149
本文介绍了Android Studio将目录标记为测试源根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在build.gradle中做了一些操作,以删除androidTest.java程序包的绿色突出显示.

I've done something in build.gradle to remove the green highlighting of the androidTest.java package.

我不知道该如何找回.

IntelliJ在上下文菜单中具有将目录标记为测试源根目录"选项,但在Android Studio中找不到等效项.

IntelliJ has a "Mark directory as test sources root" option in the context menu but I can't find the equivalent in Android Studio.

是否可以定义此文件夹,以便我可以开始测试? (如果有任何含义,则测试的Java文件都带有一个带有一个红色圆圈的"J"图标)

Is there a way to define this folder so I can start testing? (If it means anything, the test java files all have an icon of a "J" with a red circle around it)

推荐答案

您可以单击文件夹并键入Cmd + Shift + a进入操作搜索,然后键入Mark directory as您将获得菜单.

You can click on the folder and type Cmd + Shift + a to enter the action search and then by typing Mark directory as you will get the menu.

这篇关于Android Studio将目录标记为测试源根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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