开发者

append the data to android webview at run time

开发者 https://www.devze.com 2023-02-21 03:59 出处:网络
i am displaying a webpage in the webview . im adding some more content to webview at run time asfollows

i am displaying a webpage in the webview . im adding some more content to webview at run time as follows

webContent=//first html page as string content

mWebView.loadDataWithBaseURL("",webContent, "text/html", "UTF-8","" );

// some code

webContent=//second html string as string content mWebView.开发者_如何学PythonloadDataWithBaseURL("file:///sdcard/",webContent, "text/html", "UTF-8","" );

but im getting

03-31 13:26:45.448: INFO/System.out(462): java.lang.NullPointerException

any soln?


Your base url (first parameter to loadDataWithBaseURL()) should not be empty.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号