LinearLayout llQRCodeShare;
try {
llQRCodeShare.setDrawingCacheEnabled(true);
llQRCodeShare.buildDrawingCache(true);
Bitmap b = llQRCodeShare.getDrawingCache();
Bitmap bitmap = Bitmap.createBitmap(b);
llQRCodeShare.setDrawingCacheEnabled(false);
} catch (IllegalStateException e) {
LogUtil.e(TAG, e.getMessage()); //Software rendering doesn't support hardware bitmap
}
当执行代码时"llQRCodeShare.getDrawingCache()"
,抛出异常,
Software rendering doesn't support hardware bitmap
在android8.0上。
怎么解决呢?
只是做android:hardwareAccelerated="true"
in the AndroidManifest.xml
under Application
tag
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)