Android TV Emulator: No Internet Access

2019-07-15 03:53发布

问题:

My App is unable to access the Internet, when I run it on an Android TV emulator.

I thought it was my code, but the same app can access the Internet just fine when I run it on a phone emulator like the Nexus 5.

What could be wrong?


Android_TV_1080p_API_23.avd, config.ini:

avd.ini.encoding=UTF-8
AvdId=Android_TV_1080p_API_23
abi.type=x86
avd.ini.displayname=Android TV (1080p) API 23
disk.dataPartition.size=200M
hw.accelerometer=no
hw.audioInput=yes
hw.battery=no
hw.camera.back=none
hw.camera.front=none
hw.cpu.arch=x86
hw.dPad=yes
hw.device.hash2=MD5:f26df701fd74415b9a435e3e607b5d8a
hw.device.manufacturer=Google
hw.device.name=Android TV (1080p)
hw.gps=yes
hw.gpu.enabled=yes
hw.initialOrientation=landscape
hw.keyboard=yes
hw.keyboard.lid=yes
hw.lcd.density=320
hw.mainKeys=yes
hw.ramSize=1536
hw.sdCard=yes
hw.sensors.orientation=no
hw.sensors.proximity=no
hw.trackBall=no
image.sysdir.1=system-images\android-23\android-tv\x86\
runtime.network.latency=none
runtime.network.speed=full
runtime.scalefactor=0.5
sdcard.path=C:\...\Android_TV_1080p_API_23.avd\sdcard.img
skin.dynamic=yes
skin.name=1920x1080
skin.path=1920x1080
snapshot.present=no
tag.display=Android TV
tag.id=android-tv
vm.heapSize=128

回答1:

I also had this problem, unable to solve it in API 23, but take an Emulator on 22 or 21 and your are good to go.



回答2:

Update emulator image to marshmallow will solve this