0

我有一个工作 web 视图,我修改它以加载不同的 url。该网站无法加载。它只是显示一个空白的屏幕,是的,我有正确的权限。这是代码:

公共类 PowerSchoolActivity 扩展 Activity {

private static final String TAG = "PowerSchool 2";
public static final String url = null;
private WebView mWebView;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.main);
    Log.i(TAG, "onCreate");
    mWebView = (WebView) findViewById(R.id.webview);
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setBuiltInZoomControls(true);
    mWebView.getSettings().setSupportZoom(true);
    mWebView.getSettings().setSupportMultipleWindows(true);
    mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    mWebView.loadUrl("https://pschool.fsd1.org/teachers/pw.html");
    mWebView.setWebViewClient(new PowerSchoolClient());
    WebView myWebView = (WebView) findViewById(R.id.webview);
    myWebView.setWebViewClient(new WebViewClient());
}
4

1 回答 1

1

这是因为网址中的“https”

解决方案: http: //damianflannery.wordpress.com/2010/09/28/android-webview-with-https-loadurl-shows-blankempty-page/

于 2012-04-19T20:38:50.147 回答