Android Studio将目录标记为测试源根 [英] Android Studio Mark Directory as Test Sources Root
问题描述
我已经在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屋!