What a difference there is between the Res folder and the Assets folder in Android


I wonder if assets and res are the same in Android, is that sometimes I find examples that refer to resources in assets and others in res, is messing me up a bit.

asked by Webserveis 14.04.2016 в 19:12

2 answers


These would be the most notable differences between /res and /assets :


  • Inside this folder are added files that, when the .apk package is generated, keep its name and characteristics.
  • Files with capitals or signs can be added which is not allowed within /res .
  • Inside this folder you can even create a file structure.


  • The R class does not generate ids for the items stored in this folder
  • One important difference is that within / assets elements are added which can be read as a stream of bytes.


  • Contains resources of the application such as layouts, images (drawables), strings, etc.
  • The main difference with respect to /assets is that these resources are accessed through class R, which is generated automatically by the project and contains ids that refer to each resource within /res .
  • Another difference is that within /res , only files with names containing lowercase characters from "a" to "z" and numeric characters from 0 to 9 are allowed.
answered by 14.04.2016 / 20:26

By experience, in Res are all the resources of Android that you can use or create them 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 Android, for example sources and multimedia files. In my case, there I have placed videos, ogg files, sources, etc. Even files html and css .

answered by 14.04.2016 в 21:03