Android webview won't load my URL but will load others

后端 未结 3 1725
北荒
北荒 2021-01-01 23:56

I have a webiew app on android which loads some websites but not the one I need it to.

I have no idea if this is a problem with the website host or something I can d

相关标签:
3条回答
  • 2021-01-02 00:06

    I recently create one repository with a basic web view application for android with some error handling for no internet connection

    https://github.com/jgarciabt/SmartWebView

    You can clone it and start your application from it, maybe that is easier.

    0 讨论(0)
  • 2021-01-02 00:18

    Your website has a JavaScript error. Did you try something about that error in the log you shared?

    Uncaught TypeError: Cannot read property 'clear' of null", source: http://www.broadbentstudios.com/application/_output/pb.out.front.js?v=7 (1)

    0 讨论(0)
  • 2021-01-02 00:20

    Finally found the answer after a lot of searching. For anybody in a similar situation, as well as enabling javascript you also need to enable Dom storage by adding in;

    webView.getSettings().setDomStorageEnabled(true);
    

    Change webView to whatever yours is called and you should be good to go.

    Hope this helps someone.

    0 讨论(0)
提交回复
热议问题