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

inPurgeable cannot be resolved or is not a fieldpublic Bitmap ReadBitMap(Context context, int resId

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);
}

大神怎么破?
[解决办法]
我怎么没报错,你这不是运行时错吧,