andriod webview 配置网络权限

在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>





猜你喜欢

转载自blog.csdn.net/caihuashen/article/details/78365465