当前位置: 代码迷 >> Android >> inPurgeable cannot be resolved or is not a field解决方案
  详细解决方案

inPurgeable cannot be resolved or is not a field解决方案

热度:21   发布时间:2016-05-01 10:26:02.0
inPurgeable cannot be resolved or is not a field
	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);
}

大神怎么破?

------解决方案--------------------
我怎么没报错,你这不是运行时错吧, 
  相关解决方案