public Bitmap ReadBitMap(Context context, int resId) {
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inPreferredConfig = Bitmap.Config.RGB_565;
opt.inPurgeable = true;//报错inPurgeable cannot be resolved or is not a field
opt.inInputShareable = true;//报错inInputShareable cannot be resolved or is not a field
// 获取资源图片
InputStream is = context.getResources().openRawResource(resId);
return BitmapFactory.decodeStream(is, null, opt);
}
大神怎么破? |
|
![]() 20分 |
我怎么没报错,你这不是运行时错吧,
|
![]() |
不是的,这个地方有个小红×
|
![]() |
估计是我的版本不对,不是运行时出错 |
![]() |
我没有问题啊 |
![]() |
今天也遇到这问题了。 不过我顺利解决了。 |

