簡體   English   中英

Honeycomb webview上沒有網頁

[英]Webpage not available on Honeycomb webview

我們有一個webview,我們從android_assets加載。 這在2.1,2.2和2.3中工作正常。 但是,當我們在3.0中加載它時,我們得到一個“網頁不可用”消息。

這只發生在我們將參數傳遞給webview的頁面上:

WebView webView = (WebView) findViewById(R.id.my_webview);
webView.getSettings().setJavaScriptEnabled(true);

webView.addJavascriptInterface(new JavaScriptInterface(this), "androidInterface");

webView.setBackgroundColor(0);
//This works
webView.loadUrl("file:///android_asset/my.html");
//This does not work.
webView.loadUrl("file:///android_asset/my.html" + "?param=value");

知道如何讓這個在Honeycomb上工作嗎?

不回答原始問題,但解決方法。 由於我已經在使用JavascriptInterface,因此我在JavascriptInterface上設置了我想要在Javascript中讀取的值。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM