fix: allow file access for local offline packages

This commit is contained in:
2026-08-17 19:54:06 +08:00
parent 24c78bb9c2
commit b65a0400a6
@@ -56,6 +56,11 @@ class WebViewManager(private val activity: Activity) {
loadWithOverviewMode = true
setSupportZoom(false)
domStorageEnabled = true
// Android 11 + targetSdk 30 默认禁用 file:// 访问,本地离线包需要显式开启
// Android 11 + targetSdk 30 disables file:// by default; local offline
// packages need it explicitly enabled
allowFileAccess = true
allowContentAccess = true
}
}