我有一个包含一些文件的目录。我想将这个目录 bundle 在 apk 文件中,这样当我安装 apk 文件时,该目录就会被复制到 android 设备上的特定位置。
因为我在 developer.android.com 上找不到此信息,所以我可以在 apk 文件中 bundle 一个目录吗?我需要为此修改任何配置文件吗?
谢谢.. 阿杰
最佳答案
你不能,但你可以看看 android assets 文件夹,
http://developer.android.com/guide/topics/resources/providing-resources.html
Assets是原始资源,不会被android编译器压缩。
来自开发者网站:
Assets /
This is empty. You can use it to store raw asset files. Files that you save here are compiled into an .apk file as-is, and the original filename is preserved. You can navigate this directory in the same way as a typical file system using URIs and read files as a stream of bytes using the the AssetManager. For example, this is a good location for textures and game data.
关于android - 我们可以在 apk 文件中 bundle 一个目录吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12913363/