Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android SDK30+ WebView fails to show local files "ERR_ACCESS_DENIED"



  • Hello,
    When I build android app using Qt and android SDK 30 or 31, opening a local html file in WebView gives me this error:

    alt text

    As mentioned in ERR_ACCESS_DENIED in webview in Android - only with sdk 30, from SDK30 onwards WebView AllowFileAccess flag was changed to be false by default, instead of true. Changing it to true may solve the problem, but I can't find any way to do that on Qt.

    Is there a way to change qml WebView object AllowFileAccess flag value, or is another solution possible?



  • It seems there's a bug reported, regarding this issue.

    Even though we can build app targeting older SDKs, google play now required all apps to target SDK30 minimum, so that's not a solution.


Log in to reply