In a typical AS project there is a folder with resources - res. It usually contains all the resources used. I learned that in it you can create a raw folder in which you can store what I want and there are no problems with it when building a project. Is it possible to create subfolders with resources in the src folder so that when compiling there are no errors and the resources are determined?
For example, I have a lot of images in the project and it’s not convenient to store them only in the drawable folder, I would like to create drawable_1, drawable_2, and so on.
Added as written below:
sourceSets { main { res.srcDirs = [ 'src/main/res', 'src/main/res/drawable', 'src/main/res/drawable/images' ] } } When building the project Gradle produces the following error:
Execution failed for task ':app:mergeDebugResources'. C:\SDKandroid\desisns\AppName\app\src\main\res\drawable\images\one.jpg:1:1: Error: Content is not allowed in prolog.