gpt4 book ai didi

android - 在 Android 中使用 loadDataWithBaseURL() 显示图像时出现问题

转载 作者:行者123 更新时间:2023-11-29 14:11:34 26 4
gpt4 key购买 nike

在我的应用程序中,我在 webview 中显示数据,但无法在 webview 中显示图像。

我使用了 loadDatawithBaseURL() 方法。

这是我的代码..

webview.loadDataWithBaseURL("file:///059600656X/", data, "text/html", "UTF-8", "about:blank");

//这里的data是一个字符串对象,包含html解析数据。

我认为它无法在给定目录中找到图像。

有人能帮帮我吗?

最佳答案

您不能将简单的 file:/// URL 与 loadDataWithBaseURL() 一起使用,并且 "about:blank" 可能不是有效的基本网址。

关于android - 在 Android 中使用 loadDataWithBaseURL() 显示图像时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2637047/

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