Reputation: 1071
Related to this question: How to get Android Studio to recognize file as source (test)
I am running Android Studio 1.2.1.1.
If I am trying to create a test, I right click on the class name and select Go To -> Test -> Create New Test
I am then given a dialogue which asks me where I would like to put my test. I select a place. (I put it under src/androidTest)
In order for Android Studio to recognize this test, the java folder under androidTest needs to be green? How do I make it green?
Upvotes: 3
Views: 962
Reputation: 1071
Go to the Build Variants UI Element,
go to the "Test Artifact" drop down box, and select "Android Instrumentation Tests"
see if it turned green.
Upvotes: 3