Using webView's loadDataWithBaseURL not loading images from sdcard

前端 未结 2 939
终归单人心
终归单人心 2021-01-23 21:26

I would like to set some html content in my webview with some pictures. I\'ve read on the internet i must use loadDataWithBaseUrl to do such a thing because i need to link the f

2条回答
  •  遇见更好的自我
    2021-01-23 22:31

    You have a syntax error in your loading statement. You have to put : after file

    myWebView.loadDataWithBaseURL("file:///mnt/sdcard/com.mypackage.myproject/3", myHtml, "text/html", "utf-8", "");
    

提交回复
热议问题