gpt4 book ai didi

安卓 v2.2-2.3.5 : WebView : loadDataWithBaseURL : will only load page once

转载 作者:行者123 更新时间:2023-11-29 00:40:06 25 4
gpt4 key购买 nike

当我使用 .loadData.loadDataWithBaseURL 加载页面时,系统将加载一次页面。

之后,后续调用将不起作用。

在 4.0.3 中,如果我用新数据再次调用该函数,它确实会发生变化。

我如何为 2.2+ 解决这个问题?我要销毁 webview 并创建一个新的吗?

webView1.loadDataWithBaseURL("file://", page, "text/html", "UTF-8", null);
webView1.loadUrl( "javascript:window.location.reload( true )" );

最佳答案

在 loadDataWithBaseURL 中,将最后一个参数设置为数据来源的 URL,而不是 null

关于安卓 v2.2-2.3.5 : WebView : loadDataWithBaseURL : will only load page once,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9960443/

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