Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emulator for Android 12 preview no connection

I have installed the Android 12 Preview emulator. I had a lot of problems because the emulator was crashing on start up but after uninstalling and installing it again and restarting the machine etc, I managed to start it. The problem I have now is that the internet connection does not work. All the other emulators work fine. I have tried to start the emulator from the command line to set the dns

~/Library/Android/sdk/emulator/emulator -avd Pixel_5_API_S -dns-server 8.8.8.8 

What I get is that the network still does not work and I can see a lot of logs:

vqParseGuestToHostRequestLocked:734 {src_port=2489684015 dst_port=4294967295} unexpected dst_port

vqParseGuestToHostRequestLocked:734 {src_port=2489684016 dst_port=4294967295} unexpected dst_port

vqParseGuestToHostRequestLocked:734 {src_port=2489684017 dst_port=4294967295} unexpected dst_port

vqParseGuestToHostRequestLocked:734 {src_port=2489684018 dst_port=4294967295} unexpected dst_port

This is the emulator that I'm using:

Name: Pixel_5_API_S
CPU/ABI: Google APIs Intel Atom (x86_64)
Path: /Users/username/.android/avd/Pixel_5_API_S.avd
Target: google_apis [Google APIs] (API level S)
Skin: pixel_4
SD Card: 512M
fastboot.chosenSnapshotFile: 
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: pixel_5
hw.lcd.width: 1080
image.androidVersion.codename: S
hw.initialOrientation: Portrait
image.androidVersion.api: 30
tag.id: google_apis
hw.mainKeys: no
hw.camera.front: emulated
avd.ini.displayname: Pixel 5 API S
hw.gpu.mode: auto
hw.ramSize: 1536
PlayStore.enabled: false
fastboot.forceColdBoot: no
hw.cpu.ncore: 4
hw.keyboard: yes
hw.sensors.proximity: yes
hw.dPad: no
hw.lcd.height: 2340
vm.heapSize: 256
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.audioInput: yes
image.sysdir.1: system-images/android-S/google_apis/x86_64/
showDeviceFrame: yes
hw.camera.back: virtualscene
AvdId: Pixel_5_API_S
hw.lcd.density: 440
hw.arc: false
hw.device.hash2: MD5:3274126e0242a0d86339850416b0ce34
fastboot.forceChosenSnapshotBoot: no
fastboot.forceFastBoot: yes
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Google APIs
runtime.network.latency: none
disk.dataPartition.size: 6442450944
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes

enter image description here

like image 719
kingston Avatar asked Jun 11 '21 10:06

kingston


People also ask

Why is my Android Emulator not working?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.

How do I connect my emulator to the Internet?

Go to your Android\Sdk\emulator folder and open command prompt. Type emulator -list-avds to see available emulator names. Type emulator -avd name-of-your-device -netdelay none -netspeed full -dns-server 8.8. 8.8 command and press enter.

How do I connect my Android Emulator?

Run your app on the emulator After you have created an Android Virtual Device (AVD), you can start the Android Emulator and run an app in your project: In the toolbar, select the AVD that you want to run your app on from the target device drop-down menu. Click Run.


Video Answer


1 Answers

Based on the issuetracker, the Android S beta 2 emulator image depends on a newer version of the emulator itself (without explicitly requiring it). The problem should be resolved by installing a newer 30.7.3 version of the emulator from the canary channel.


Update 2021-06-23: Emulator 30.7.4 is now available in the stable channel.

like image 177
laalto Avatar answered Oct 21 '22 12:10

laalto