sitting-duck
sitting-duck

Reputation: 1071

folder under androidTest is not green

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

Answers (1)

sitting-duck
sitting-duck

Reputation: 1071

Go to the Build Variants UI Element,

enter image description here

go to the "Test Artifact" drop down box, and select "Android Instrumentation Tests"

instrumentation tests dropdown

see if it turned green.

Upvotes: 3

Related Questions