我有一个工作 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());
}