How can I add a sub folder to the raw folder in my Android app? [duplicate]

别说谁变了你拦得住时间么 提交于 2019-11-27 07:35:39

问题


This question already has an answer here:

  • Can the Android Layout folder contain subfolders? 18 answers

Of course I can right click the raw folder and add new folder but when I export the project, the APK file does not contain the new sub folder.


回答1:


You can't.

The folders in /res/ have a predefined structure, and you can't add subfolders.

However, seeing as this is the raw folder, you may want to look into using the assets folder, in which sub folders are supported.

Keep in mind thought that by using assets you won't be able to use R.*.* references anymore. You will have to go through the AssetManager.



来源:https://stackoverflow.com/questions/15508160/how-can-i-add-a-sub-folder-to-the-raw-folder-in-my-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!