Reputation: 1914
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)
Upvotes: 16
Views: 10288
Reputation: 858
In Android Studio Koala 2023.3.2 Canary 2, if you right-click on the file, at the very bottom of the long menu there is "Mark Directory As".
(The icons are Atom Material Icons)
Upvotes: 0
Reputation: 2362
For others in case somebody do not use gradle; maybe you can do something like this:
Project Structure > Project Settings:
Upvotes: 0
Reputation: 1511
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."
Upvotes: 1
Reputation: 588
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.
Upvotes: 57