I would like to add layout xml files into my androidTest folder to be used only for testing.
androidTest
I added res/layout folder to androidTest
res/layout
Cannot comment, but wanted to further add to @Slava's answer. If someone can add it as a comment, by all means.
Try suppressing the lint errors with the accepted answer from this question. Android Studio Remove lint error