stackoverflow的原话:
The limitation is on compressed assets. If the asset is uncompressed, the system can memory-map the file data and use the Linux virtual memory paging system to pull in or discard 4K chunks as appropriate. (The "zipalign" tool ensures that uncompressed assets are word-aligned in the file, which means they'll also be aligned in memory when directly mapped.)

If the asset is compressed, the system has to uncompress the entire thing to memory. If you have a 20MB asset, that means 20MB of physical memory is tied up by your application.

Ideally the system would employ some sort of windowed compression, so that only parts need to be present, but that requires some fanciness in the asset API and a compression scheme that works well with random access. Right now APK == Zip with "deflate" compression, so that's not practical.

You can keep your assets uncompressed by giving them a suffix of a file type that doesn't get compressed (e.g. ".png" or ".mp3"). You may also be able to add them manually during the build process with "zip -0" instead of having them bundled up by aapt. This will likely increase the size of your APK


总之:修改后缀名就OK了,修改为png或mp3格式。

作者:xiechengfa 发表于2012-8-5 15:02:58 原文链接 阅读:0 评论:0 查看评论

更多相关文章

  1. Android--取出SDcard卡上指定后缀名的文件
  2. php脚本的后缀名是什么
  3. 后缀名为php是什么意思
  4. php文件后缀名是什么
  5. 像那种以.html为后缀名的网站使用的是什么技术啊?

随机推荐

  1. You must supply a layout_width attribu
  2. android通过google api获取天气信息示例
  3. C# 实现 类似Android的Toast
  4. Android(安卓)Jetpack Compose 之 Text
  5. Android(安卓)Stagefright MPEG4Extracto
  6. Android(安卓)简单的网络变化监听器
  7. Android(安卓)Studio多个Module依赖同一
  8. android通过号码查询联系人姓名
  9. Android(安卓)Fastboot源码分析
  10. Android(安卓)手机相机自动对焦