Android Studio Mark Directory as Test Sources Root

五迷三道 提交于 2020-04-09 05:00:08

问题


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

I don't know how to get it back.

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

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)


回答1:


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.




回答2:


For me, this option is no longer so easily available. To access it I need to double tap 'shift' and manually type "mark directory as. Then I can pick it from the list."



来源:https://stackoverflow.com/questions/31748751/android-studio-mark-directory-as-test-sources-root

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!