You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android has a little bit of support for this baked in, by way of the androidTest instrumentation tests. Anything in src/androidTest/res gets built into com.mypackage.test.R.java (alongside com.mypackage.R.java for production) when you run the gradle task compileDebugAndroidTestSources.
If you do this, you get a set of intermediate directories with androidTest as the build flavor.
See my StackOverflow question and answer here for the kind of changes I had to make to the robo gradle test runner to make it halfway work.
I think that we should have something gradle-wise that forces a build of test.R.java and ensures we load the correct resources.
(In my own personal case I've mapped src/test/res into the androidTest sourceSet's res folders for consistency's sake, but out-of-the-box it looks in src/androidTest/res.)
The text was updated successfully, but these errors were encountered:
Android has a little bit of support for this baked in, by way of the
androidTest
instrumentation tests. Anything insrc/androidTest/res
gets built intocom.mypackage.test.R.java
(alongsidecom.mypackage.R.java
for production) when you run the gradle taskcompileDebugAndroidTestSources
.If you do this, you get a set of intermediate directories with
androidTest
as the build flavor.See my StackOverflow question and answer here for the kind of changes I had to make to the robo gradle test runner to make it halfway work.
I think that we should have something gradle-wise that forces a build of test.R.java and ensures we load the correct resources.
(In my own personal case I've mapped
src/test/res
into the androidTest sourceSet's res folders for consistency's sake, but out-of-the-box it looks insrc/androidTest/res
.)The text was updated successfully, but these errors were encountered: