I wanted to use a resource folder in my test project with Android Studio to store internationalized strings that I'll only use in my UI tests.
But as I'm able to create the /app/src/androidTest/res
folder, I can't create a resource folder such as "values" in it.
Android Studio says that this folder already exists. It exists, but in my main project under /app/src/main/res.
So can I create resources available only for my test project, and how, or I'am completely wrong and the reason that I can't do it is that I mustn't do it ?
Thanks.
The resources folder belongs to the maven project structure where we place the configuration and data files related to the application. The location of the folder is “ src/main/resources “.
Local tests location By default, the source files for local unit tests are placed in module-name/src/test/ . This directory already exists when you create a new project using Android Studio.
As mentioned in this answer, you are probably using the wrong package in the import statement.
import com.your.package.test.R;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With