I wonder if assets
and res
are the same in Android, is that sometimes I find examples that make references to resources in assets and others in res, it's confusing me a bit.
I wonder if assets
and res
are the same in Android, is that sometimes I find examples that make references to resources in assets and others in res, it's confusing me a bit.
These would be the most notable differences between
/res
and/assets
:/assets
/res
.Example:
/res
/assets
is that these resources are accessed through the R class, which is automatically generated by the project and contains ids that reference each resource within/res
./res
, only files with names containing lowercase characters from "a" to "z" and numeric characters from 0 to 9 are allowed.From experience, in Res go all the Android resources that you can use or create yourself, for example, animations, styles, extra layouts, etc. Already in the folder
assets
would go all the extra resources that you can use and that are not from Android, for example sources and multimedia files. In my case, there I have placed videos, ogg files, sources, etc. Even fileshtml
andcss
.