忽略来自 Android APK 的文件 [英] Ignoring files from Android APK

查看:34
本文介绍了忽略来自 Android APK 的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以忽略打包到 Android APK 中的文件?例如,我的 .psd 文件与其对应的 .png 文件位于同一文件夹中,并且所有 .psd 文件都会打包.

Is it possible to ignore files from being packaged into the Android APK? For instance, I have my .psd files in the same folder as their .png counterparts, and all the .psd files get packaged up.

我知道我可以将它们移到文件夹之外,但我喜欢将它们放在一起,如果可能的话我宁愿不要

I know I can move them outside of the folder, but I like having them in all together and would prefer not to if possible

推荐答案

Android Asset Packaging Tool (AAPT) 实际上支持此功能.

This is actually supported in the Android Asset Packaging Tool (AAPT).

我总是把类似 psd 的文件放在这样的资源目录中:

I always put my psd-like files in the resource directories like this:

/res/drawable/_pre_production/ic_launcher.psd

任何_pre_production目录都不会添加到APK中.

Any _pre_production directory will not be added to the APK.

通过这种方法,它们位于实际图像目录的子目录中,但我看不出有什么问题.它仍然井井有条.;)

With this approach they're in a sub-directory of the actual images' directory, but I don't see the problem with that. It is still neatly organized. ;)

这篇关于忽略来自 Android APK 的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆