andriod webview 配置网络权限

来源:互联网 发布:ual研究生 留学 知乎 编辑:程序博客网 时间:2024/05/29 12:16

在AndriodManifest.xml文件中增加:

<uses-permission android:name="android.permission.INTERNET" />
注意,位置在</application>后面。
完整如下:(原基础只增加了上面一句)


<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"    package="com.cdm.gehua_001">    <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">        <activity android:name=".MainActivity">            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>        </activity>    </application>    <uses-permission android:name="android.permission.INTERNET" /></manifest>





原创粉丝点击