BitmapFactory.decodeResource 成功但 mbuffer 为空

BitmapFactory.decodeResource succeeds but mbuffer is null

我正在使用 BitmapFactory.decodeResource,一切都很好,直到我在 Kindle Fire 上试用它。 BitmapFactory.decodeResource 不 return null,GetWidth 等都是正确的,但 mbuffer(私有)为 null,因此位图为空白。 我需要在这一点上进行测试,看看它是否失败了,但我不允许访问 mbuffer。 有任何想法吗? 谢谢

decodeResource() 考虑了设备屏幕属性。显然它不能以这种方式解码。只需尝试不同的图像。无论如何你不能乱用那个缓冲区。如果您只想获取位图,则从原始或资产加载图像