“未捕获的ReferenceError:未定义getWeather”,

时间:2016-03-30 08:12:12

标签: javascript android webview

WebSettings webSettings = mWebView.getSettings();
webSettings.setUseWideViewPort(true);
webSettings.setJavaScriptEnabled(true);
mWebView.setWebChromeClient(new WebChromeClient());
webSettings.setGeolocationEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.setWebChromeClient(new WebChromeClient() {
    public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
        callback.invoke(origin, true, false);
    }
});
mWebView.loadUrl("http://www.notifyweather.net23.net/");

Javascript将无法在某些手机中运行 log cat显示以下错误:

  

INFO:CONSOLE(10)]“未捕获的ReferenceError:getWeather不是   定义“,来源:http://www.notifyweather.net23.net/js/weather.js   (10)

0 个答案:

没有答案