I have the following folder structure in Android Studio:
├── androidTest
│ ├── java
│ └── res
│ └── raw
│ └── test_file
└── main
├──
I had the androidTest resources in the right spot (src/androidTest/res) and I still couldn't access them via . I spent a lot of time googling trying to figure out what was going on..
I FINALLY stumbled onto the answer. If you're building a buildType where you specified an applicationIdSuffix, your files are at !!!!
i.e.
applicationId "com.example.my.app"
buildTypes {
debug {
applicationIdSuffix ".debug"
}
}
if you have androidTest resources in the right directory, then you can only access them via com.example.my.app.debug.test.R !!!!