【Android】BitmapFactory.Options内存溢出

2025-06-30 03:23:23

1、OOM(Out Of Memory) 就是内存溢出。java.lang.OutOfMemoryError: Failed to allocate a 6741804 byte allocation with 200220 free bytes and 195KB until OOM

【Android】BitmapFactory.Options内存溢出

3、进入手机【图库】代码方法如下Intentintent=newIntent(Intent.ACTION_GET_CONTENT);int髫潋啜缅ent.addCategory(Intent.CATEGORY_OPENABLE);intent.setType("image/*");startActivityForResult(intent,CHOOSE_PICTURE);返回到onActivityResult进行处理

【Android】BitmapFactory.Options内存溢出

5、解决这个问题的方法通过以下代码获取,图片路径。

【Android】BitmapFactory.Options内存溢出
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢