我在我的项目中使用 https://github.com/jhansireddy/AndroidScannerDemo 这个扫描库。
当我捕获图像时,我在控制台中得到 D/skia: --- Failed to create image decoder with message 'unimplemented'
并且 The captured image not sets to imageview in Android P 。
此外,当我在 Android Q 中测试相同的应用程序时,我遇到了以下错误。
2020-02-05 11:32:23.668 9270-9270/? E/ReviewScreenImpl: onClickOKButton() - Fail to decode captured picture
有人可以帮助解决上述问题。
原文由 Ajinkya kadam 发布,翻译遵循 CC BY-SA 4.0 许可协议
我有同样的问题,似乎 getResources 中有一个错误,不在你使用的库中,因为我不使用它。但是,您可以改用 ResourcesCompat,如下所示:
要么
取决于您的可绘制类型(矢量或图像)。
请注意,这只会在 API > 22 上运行。