包含问题
- webview使用方法
2020-10-16 E/chromium: [ERROR:address_tracker_linux.cc(245)] Could not send NETLINK request: Permission denied (13)
配套使用以下方法。
web_01 = findViewById(R.id.web_01);
......各种设置,参考菜鸟教程......
web_01.loadUrl("https://blog.csdn.net/qq_33721320/article/details/84400825");
web_01 = new WebView(this);
......各种设置,参考菜鸟教程......
setContentView(web_01);
net::ERR_CLEARTEXT_NOT_PERMITTED
无法加载url
添加usesCleartextTraffic还是不能显示网页
,因为sdk版本问题,要求sdk23以上,我的时minsdk21,因此添加tools:targetApi即可。
获取方式
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:targetApi="m">
</application>