迁移到AndroidX后,WebViewClient中没有显示图像



我有一个本地html文件显示与WebViewClient/WebView。这个html文件的一部分是:

<input name="aName" type="image" src="file:///storage/emulated/0/replaceWithTheApp/data/image.png" value="1">

在迁移到AndroidX之前显示(png) -图像。

html中还有其他引用图像的部分不再显示。

我将html-Code从from file://改为适当的content://。

Webview实现的测试显示版本70.0.3538.110仍然能够处理文件://,而新版本p.ex。而Chrome 92.0.4515.115则没有。

最新更新