android-emulator-m1-preview icon indicating copy to clipboard operation
android-emulator-m1-preview copied to clipboard

webview cann't load any url.

Open kekxv opened this issue 4 years ago • 2 comments

webview cann't load any url. return net::ERR_CLEARTEXT_NOT_PERMITTED

Name: <build>
CPU/ABI: arm64
Path: /Applications/Android Emulator.app/Contents/MacOS/api30-gphone-arm64-v8a
Target: google_apis [Google APIs] (API level 30)
Skin: 1080x1920
SD Card: <none>
avd.ini.displayname: s
avd.ini.encoding: UTF-8
disk.dataPartition.size: 2048M
fastboot.chosenSnapshotFile: 
fastboot.forceChosenSnapshotBoot: no
fastboot.forceColdBoot: yes
fastboot.forceFastBoot: no
hw.accelerometer: yes
hw.arc: false
hw.audioInput: yes
hw.battery: yes
hw.camera.back: virtualscene
hw.camera.front: emulated
hw.cpu.ncore: 2
hw.dPad: no
hw.device.hash2: MD5:55acbc835978f326788ed66a5cd4c9a7
hw.device.manufacturer: Google
hw.device.name: pixel_2
hw.gps: yes
hw.gpu.enabled: yes
hw.gpu.mode: auto
hw.initialOrientation: Portrait
hw.keyboard: yes
hw.lcd.density: 420
hw.lcd.height: 1920
hw.lcd.width: 1080
hw.mainKeys: no
hw.ramSize: 2048
hw.sdCard: no
hw.sensors.orientation: yes
hw.sensors.proximity: yes
hw.trackBall: no
runtime.network.latency: none
runtime.network.speed: full
showDeviceFrame: yes
tag.display: Google APIs
tag.id: google_apis
vm.heapSize: 256

screenshot

kekxv avatar Dec 28 '20 02:12 kekxv

any update on this?

armanism24 avatar Jan 03 '21 13:01 armanism24

any update on this?

@armanism24 android9 or later HTTP is not allowed to load by default

add android:usesCleartextTraffic="true" by manifest in application dom.

like this

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
    <uses-permission android:name="android.permission.INTERNET" />
    <application
        ...
        android:usesCleartextTraffic="true"
        ...>
        ...
    </application>
</manifest>

kekxv avatar Jan 03 '21 13:01 kekxv