The folders of an Android application follow a well-defined folder structure and names.
By default the Resources of the kind layout should be placed in the folder
path_do_projeto app src main res layout
In your case what’s wrong is besides having ..\app src main res layouts(layouts instead of layout), has yet another folder layout-Tuto.
To solve
- rename the folder layouts for layout*.
- pass the contents of the folder layout-Tuto to the layout.
- delete the folder layout-Tuto.
However it is possible to have other folders from Resources. They must be configured in the file build.Gradle through sourceSets
using the property res.srcDirs
.
android{
....
....
sourceSets {
main {
res.srcDirs += ['src/main/res2']
}
}
}
Yes, but if I do this, how will I get the layouts organized by folder? Everything in a folder will only be very difficult to locate when the project gets larger
– WitnessTruth
But the architecture is the same. If the app is that big, you can modulate it and configure the dependencies between them in the grid. So you would have one folder per module with the classes, activities, layouts, etc in each of them.
– Márcio Oliveira