Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 255
sitting-duck Avatar asked Jan 26 '26 08:01

sitting-duck


1 Answers

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.

like image 68
sitting-duck Avatar answered Jan 28 '26 20:01

sitting-duck



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!