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:计算剩余内存
  2. Android(安卓)P SystemUI添加VoWiFi Tile
  3. Android自定义Toast 解决关闭通知 Toast无法弹出
  4. Android(安卓)SQLiteOpenHelper的使用
  5. CheckBox android:paddingLeft 不兼容问题解决方法
  6. Android中Broadcast的Intent大全
  7. Android图片放大修改代码
  8. android修改进入工程模式
  9. Android(安卓)P Android.dp添加逻辑判断

随机推荐

  1. android之MVC
  2. android:installLocation简析
  3. Android(安卓)数据存储(二) 文件的使用
  4. android 代码生成布局
  5. StevGuo系列文章翻译之Android内存泄漏检
  6. 无需 root 实现在 Android(安卓)设备上运
  7. Android上使用libgdx
  8. 在Ubuntu上下载编译安装Android最新内核
  9. 详解Android核心模块及相关技术
  10. Android——编译release版签名系统