今天在做相册和照相机获取图片时遇到了这个问题,后来查看文档http://developer.android.com/reference/android/os/TransactionTooLargeException.html。

The Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. Consequently this exception can be thrown when there are many transactions in progress even when most of the individual transactions are of moderate size.

原来是进程缓冲区大小只有1M,相机当时设置的是8M一张,直接溢出了。解决方法,在activity页面返回时不要直接返回位图,只要返回资源的Uri,在调用相册的activity中通过Uri获取位图。

更多相关文章

  1. Android 保存图片到系统相册
  2. android从相册中获取图片并将其显示在当前界面
  3. android中实现从相册中一次性获取多张图片与拍照,并将选中的图片
  4. Android:读取本地相册与相机获取图片上传到服务器(用字符串的形式
  5. Android帧缓冲区(Frame Buffer)硬件抽象层(HAL)模块Gralloc的实现原
  6. Android中调取系统相机和相册功能
  7. Android调用系统相机和相册,解决图片方向问题,压缩图片
  8. android :图片下载到本地后不让其在相册中显示
  9. Android WebView中打开相机拍照和选择相册

随机推荐

  1. android客户端与服务器端交互 如何保持se
  2. android 反编译和代码解读
  3. Android 图标右上角添加数字提醒
  4. 【国外转】Spring Android and Maven (Ma
  5. android kernel下載及編譯 (goldfish)
  6. android 检测应用异常 UncaughtException
  7. Android Activity去除标题栏和状态栏(z)
  8. android中drawable显示到view上的过程
  9. 控件:拖动条 --- SeekBar(改变屏幕亮度)
  10. android 代码设置apn