问题描述
我的Android应用程序中有很多未使用的图像.这些图像放置在项目根目录下的单独文件夹中.在项目中的任何地方都没有使用它们,但是我需要保留它们.
I have a lot of unused images in my android app. Those images are placed in separate folder in project root directory. They are not being used anywhere in a project, but I need to keep them.
我担心的是,这些未使用的图像会包含在apk文件中吗?由于它们很多,因此会增加apk文件的大小.
My concern is that will these unused images be included in the apk file? Since there are a lot of them and increase the size of apk file.
推荐答案
存储在根目录(包括自定义子目录)中的文件不包含在APK中.在项目根目录中具有项目所需的自己的文件是非常普遍的做法.例如,源许可证文件,待办事项列表,包含要从中创建分布式图像的高分辨率图像的目录等.
Files stored in the root directory (including custom subdirectories) are not included in the APK. It is very common practice to have your own files needed for the project in the project root. For example, a source license file, a to-do list, a directory with high-resolution images that you create distributed images out of, etc.
Android使用这些具有特殊含义的子目录:
Android uses these subdirectories with special meaning:
- src/
- res/
- 资产/
- 库/
- gen/
- bin/
使用其他名称以外的子目录名称,Android会忽略您的文件.
Using a subdirectory name other than those, Android will ignore your files.
这篇关于APK文件中包含哪些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!