gpt4 book ai didi

android - D/skia : --- Failed to create image decoder with message 'unimplemented'

转载 作者:行者123 更新时间:2023-12-03 13:25:36 58 4
gpt4 key购买 nike

我正在使用 https://github.com/jhansireddy/AndroidScannerDemo我项目中的这个扫描库。

当我捕获图像时,我得到 D/skia: --- Failed to create image decoder with message 'unimplemented'在控制台中,捕获的图像未设置为 中的 ImageView 安卓P .

当我在 中测试相同的应用程序时安卓Q 我得到以下错误。
2020-02-05 11:32:23.668 9270-9270/? E/ReviewScreenImpl: onClickOKButton() - Fail to decode captured picture
有人可以帮助解决上述问题。

最佳答案

我有同样的问题,getResources 中似乎有一个错误,不在您使用的库中,因为我不使用它。但是,您可以改用 ResourcesCompat,如下所示:

val myLogo = (ResourcesCompat.getDrawable(this.resources, R.drawable.ic_home_black_24dp, null) as VectorDrawable).toBitmap()

或者
val myLogo = (ResourcesCompat.getDrawable(this.resources, R.drawable.ic_home_black_24dp, null) as BitmapDrawable).bitmap

取决于您的可绘制类型(矢量或图像)。

请注意,这只会在 API > 22 上运行。

关于android - D/skia : --- Failed to create image decoder with message 'unimplemented' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60070017/

58 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com