Why cant we just place the app icons in the res/drawable folders too?
哦,你可以.谷歌不推荐它,就是这样.
从my book的6.5版引用自己:
While
drawable resources might be removed when packaging an APK, such as for the
Gradle for Android split system for making density-specific editions of an app,
mipmap resources are left alone, apparently
这是因为发射器图标可以从比用于所有其他可绘制的常规设备密度更高密度的桶中拉出.将它们放在res / mipmap – * /目录中意味着我们不会无意中摆脱它们作为优化APK大小的一部分.
(为什么他们没有以更好的方式处理这个,我不知道)
how do I create other drawable assets and place them in the drawable folders with the Android Studio Image Asset wizard? (Accessed by right clicking in the project, selecting New > Image Asset)
图像资源向导仅将启动器图标放在res / mipmap – * /目录中.如果您选择其他图标类型,它们将进入res / drawable – * /.当然,Image Asset向导本身是可选的.
本文讨论了Android Studio的Image Asset Wizard为何将启动器图标默认放入mipmap–*/目录,而其他图标置于drawable–*/。作者指出这种做法可能导致资源优化问题,并质疑其处理方式。
2811

被折叠的 条评论
为什么被折叠?



