Android studio Emulator: Pixel 4 API 31 - Another emulator instance is running. Please close it. When No emulator running - android-studio

I'm just trying to setup Android studio and my emulator. However I can only ever run it once on pc start up after that if I shut down the emulator and try and launch it again I will get and error and the logs are saying there is another emulator running.
2022-07-04 14:18:50,723 [ 22398] WARN - Emulator: Pixel 4 API 31 - Another emualtor is still running, wait for a sec...
2022-07-04 14:18:51,737 [ 23412] ERROR - Emulator: Pixel 4 API 31 - Another emulator instance is running. Please close it or run all emulators with -read-only flag.
2022-07-04 14:18:51,738 [ 23413] ERROR - Emulator: Pixel 4 API 31 - Android Studio Chipmunk | 2021.2.1 Patch 1 Build #AI-212.5712.43.2112.8609683
2022-07-04 14:18:51,738 [ 23413] ERROR - Emulator: Pixel 4 API 31 - JDK: 11.0.12; VM: OpenJDK 64-Bit Server VM; Vendor: Oracle Corporation
2022-07-04 14:18:51,738 [ 23413] ERROR - Emulator: Pixel 4 API 31 - OS: Windows 10
2022-07-04 14:18:51,738 [ 23413] INFO - Emulator: Pixel 4 API 31 -
2022-07-04 14:18:51,748 [ 23423] INFO - Emulator: Pixel 4 API 31 - Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
2022-07-04 14:18:51,850 [ 23525] INFO - Emulator: Pixel 4 API 31 - Process finished with exit code 1
2022-07-04 14:18:51,850 [ 23525] ERROR - Emulator: Pixel 4 API 31 - Emulator terminated with exit code 1
java.lang.Throwable: Emulator terminated with exit code 1
However there are no lock files in the area it directs me to besides multiinstance.lock. which I can't delete because it's always in use.
There is no stop option in device manager to stop the device.
Kill-server doesn't make a difference.
Graphics is set to Automatic and can't be changed.
The only thing that fixes it is if I delete the emulator and rebuild it or restart my machine and deleting the emulator gives an error although it does remove it I assume this is because it can't delete multiinstance.lock. file.
if anyone can help I would appreciate it.
This is all on windows 11
Edit so I have found the issue, when I shutdown the emulator the process Qemu-system-x86_64.exe under Android studio does not shutdown. I don't know what this does or is but once I end the task I can once again launch the emulator. This is really annoying and I don't know what is causing it.

Related

Error when installing apk on emulator in WebStorm but not in Android Studio

I want to develop a React Native app in WebStorm. Therefore I created my emulator in Android Studio which I use in WebStorm as an external tool. If I start it in WebStorm I get:
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
emulator: INFO: Found systemPath C:\Users\aerith\AppData\Local\Android\Sdk\system-images\android-33\google_apis\x86_64\
INFO | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO | IPv4 server found: 172.17.0.11
INFO | added library vulkan-1.dll
INFO | configAndStartRenderer: setting vsync to 60 hz
INFO | injectedQemuChannel!
INFO | Informing listeners of injection.
INFO | Rootcanal has been activated.
WHPX on Windows 10.0.19044 detected.
Windows Hypervisor Platform accelerator is operational
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
INFO | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
INFO | Advertising in: C:\Users\aerith\AppData\Local\Temp\avd\running\pid_18624.ini
INFO | setDisplayConfigs w 1080 h 2400 dpiX 420 dpiY 420
It also starts successfully. However if I want to install an apk (I can install it on the same emulator in Android Studio) I get this error:
Unable to read the given APK.
Ensure that the file is readable.
Any ideas where the problem could be?

Failed to create Vulkan instance - Android Studio, Windows 10

I need to work with Android studio, but Android virtual device is not starting.
I am getting this error:
22.04.2020
10:23 Emulator: emulator: ERROR: VkCommonOperations.cpp:496: Failed to create Vulkan instance.
10:23 Emulator: C:\Users\blatsabidze\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'
10:23 Emulator: deleteSnapshot: for default_boot
10:23 Emulator: Screenshot failed to find cb 0
10:23 Emulator: Process finished with exit code 0
I have hp prodesk 400 g3 mt with Intel HD Graphics 530, I5 6500
I there problem with my hardware?
Thanks
I recently changed my AVD Configuration > Graphics to "Software" (because of what's suggested in this answer). When I set it back to "Automatic", the error was gone.
Installing HAXM solved my problem.
https://github.com/intel/haxm/releases

Emulator fails to Launch

I was using the emulator perfectly fine yesterday, but today I cannot open the emulator. I have read up on the android documentation and on other issues people have run into and I cannot find a solution. I have attempted to force the emulator to run through the terminal using both -gpu host and -gpu swiftshader_indirect and I was not successful. I have updated all SDK Platforms and SDK Tools with no success. I have deleted the emulator and installed a different emulator through the AVD manager to be certain the download was current. Here are also some of the trouble shooting commands I have tried with the error messages. I am not sure what to do now. If anyone has any advice, I would greatly appreciate it!
Here is what the Terminal shows:
emulator: WARNING: encryption is off
init: Could not find wglGetExtensionsString!
getGLES2ExtensionString: Could not find GLES 2.x config!
Failed to obtain GLES 2.x extensions string!
Could not initialize emulated framebuffer
emulator: WARNING: load_config.cpp:52: Could not parse verified boot config:
emulator: WARNING: load_config.cpp:54: 1:1: Invalid control characters encountered in text.
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\iante.android\emulator-grpc.cer security will be disa
bled.
Started GRPC server at 127.0.0.1:8554
emulator: ERROR: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
Make sure your GPU drivers are up to date.
Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" t
o "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/i
ssues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
crashhandler_die: fatal: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
Make sure your GPU drivers are up to date.
Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" t
o "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/i
ssues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
And this is what the event log reports:
1:30 PM Emulator: init: Could not find wglGetExtensionsString!
1:30 PM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!
1:30 PM Emulator: Failed to obtain GLES 2.x extensions string!
1:30 PM Emulator: Could not initialize emulated framebuffer
1:30 PM Emulator: emulator: WARNING: load_config.cpp:52: Could not parse verified boot config:
1:30 PM Emulator: emulator: WARNING: load_config.cpp:54: 1:1: Invalid control characters encountered in text.
1:30 PM Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\iante.android\emulator-grpc.cer security will be disabled.
1:30 PM Emulator: Started GRPC server at 127.0.0.1:8554
1:30 PM Emulator: emulator: ERROR: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1:30 PM Emulator: crashhandler_die: fatal: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1:30 PM Emulator:
1:30 PM Emulator: 1. Make sure your GPU drivers are up to date.
1:30 PM Emulator:
1:30 PM Emulator: 2. Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
1:30 PM Emulator:
1:30 PM Emulator: 3. Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader".
1:30 PM Emulator:
1:30 PM Emulator: Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/issues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
1:30 PM Emulator:
1:30 PM Emulator: Process finished with exit code -1073741819 (0xC0000005)
EDIT:
When I restarted my computer, I saw there was an update available for Android Studio, so I updated it accordingly. When I ran the main activity as I have done so previously with my preferred AVD selected the emulator failed to start. Then I attempted to run it through the terminal with both -gpu host and -gpu swiftshader_indirect commands and it still did not work.
SOLUTION TO MY ISSUE:
1. Restart computer.
2. Open Android Studio and run the emulator through the terminal using emulator -avd Pixel_2_API_29 -gpu host.
3. Now run the main activity.
It is beyond me why all of a sudden now this is the work around to run on the emulator when I have previously simply clicked run main activity with my preferred AVD and it would run without problems.
I hope this helps if anyone runs into this issue. I do not think this a complete solution, but I can live with this for the time being.
this from GUI
Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader". solution image

Android Emulator not working on MAC

I've been trying to use the Android Emulator after downloading Android Studio. I've used an old Samsung S4 before, but need something compatible to Marshmallow for certain features.
The problems I am seeing are:
-Emulator doesn't run
-Android screen shows as if it's preparing to boot but doesn't
-When android screen disappears after hour of waiting, screen shows dialog that says the system is unresponsive, and to wait or kill the
process
-When I try to run app on AVD while that screen is showing, error from Android Studio pops up saying that the AVD didn't install APK's
correctly and to uninstall them or cancel.
The solutions I have tried:
-Lowering AVD RAM to 512 & 236 MB
-Turning emulator cameras off
-Turning off Audio
-Graphics preference set to software
-Deleting and redownloading everything
-Checking to make sure API matches SDK
-Trying different API (25)
-Downloading BlueStacks (Didn't realize it uses Kitkat)
Most of the solutions for a slow/not working emulators were related to the Emulator settings of which I changed and tried. I've been stuck on this for three days and am desperate for a solution so I can test my app which requires Android API of 23 +.
A little side note just in case I'm out-of-luck. I'm using a mid-2010 MAC running on OSX Sierra, Core 2 duo processor, 16GB RAM, 1TB hard drive.
**Update
I've ran the emulator through the command line and here is the output that I am receiving. The emaulator is still loading on the Android Screen but no more output has been logged for the last 30 minutes after "Adb connected, start proxing data".
Macs-MacBook-Pro-2:sdk joncorrin$ tools/emulator #Nexus_5X_API_23 -verbose
emulator:Android emulator version 25.3.0.0 (build_id 3394391)
emulator:Found AVD name 'Nexus_5X_API_23'
emulator:Found AVD target architecture: x86
emulator:argv[0]: 'tools/emulator'; program directory: '/Users/mac/Library/Android/sdk/tools'
emulator: Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/
emulator:Probing for /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86//kernel-ranchu: file exists
emulator:Auto-config: -engine qemu2 (based on configuration)
emulator: Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/
emulator:try dir /Users/mac/Library/Android/sdk/tools
emulator:try dir tools/
emulator:try dir emulator
emulator:Found target-specific 64-bit emulator binary: emulator/qemu/darwin-x86_64/qemu-system-i386
emulator:Adding library search path: 'emulator/lib64'
emulator: Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/
emulator: Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/
emulator:GPU emulation is disabled
emulator: Adding library search path for Qt: 'emulator/lib64/qt/lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=emulator/lib64/qt/plugins
emulator: Running :emulator/qemu/darwin-x86_64/qemu-system-i386
emulator: qemu backend: argv[00] = "emulator/qemu/darwin-x86_64/qemu-system-i386"
emulator: qemu backend: argv[01] = "#Nexus_5X_API_23"
emulator: qemu backend: argv[02] = "-verbose"
emulator: Concatenated backend parameters:
emulator/qemu/darwin-x86_64/qemu-system-i386 #Nexus_5X_API_23 -verbose
emulator: WARNING: Crash service did not start
emulator: Android virtual device file at: /Users/mac/.android/avd/Nexus_5X_API_23.ini
emulator: virtual device content at /Users/mac/.android/avd/Nexus_5X_API_23.avd
emulator: virtual device config file: /Users/mac/.android/avd/Nexus_5X_API_23.avd/config.ini
emulator: using core hw config path: /Users/mac/.android/avd/Nexus_5X_API_23.avd/hardware-qemu.ini
emulator: Found AVD target API level: 23
emulator: Read property file at ./system-images/android-23/google_apis/x86//build.prop
emulator: No boot.prop property file found.
emulator: found skin 'nexus_5x' in directory: /Users/mac/Library/Android/sdk/skins/
emulator: autoconfig: -skin nexus_5x
emulator: autoconfig: -skindir /Users/mac/Library/Android/sdk/skins/
emulator: autoconfig: -kernel ./system-images/android-23/google_apis/x86//kernel-ranchu
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk ./system-images/android-23/google_apis/x86//ramdisk.img
emulator: Using initial system image: ./system-images/android-23/google_apis/x86//system.img
emulator: autoconfig: -data /Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img
emulator: autoconfig: -initdata /Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata.img
emulator: autoconfig: -cache /Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img
emulator: autoconfig: -sdcard /Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img
emulator: Increasing RAM size to 1024MB
emulator: System image is read only
emulator: GPU emulation is disabled
emulator: Found 2 DNS servers: 75.75.75.75 75.75.76.76
emulator: trying to load skin file '/Users/mac/Library/Android/sdk/skins//nexus_5x/layout'
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 6.0.5 (3) is installed and usable.
emulator: Adjusting Contiguous Memory Allocation of 1080x1920 framebuffer for software renderer to 16MB.
emulator: Found 2 DNS servers: 75.75.75.75 75.75.76.76
Content of hardware configuration file:
hw.cpu.arch = x86
hw.cpu.model = qemu32
hw.cpu.ncore = 1
hw.ramSize = 1024
hw.screen = multi-touch
hw.mainKeys = false
hw.trackBall = false
hw.keyboard = true
hw.keyboard.lid = false
hw.keyboard.charmap = qwerty2
hw.dPad = false
hw.gsmModem = true
hw.gps = true
hw.battery = true
hw.accelerometer = true
hw.audioInput = true
hw.audioOutput = true
hw.sdCard = true
hw.sdCard.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img
disk.cachePartition = true
disk.cachePartition.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img
disk.cachePartition.size = 66m
hw.lcd.width = 1080
hw.lcd.height = 1920
hw.lcd.depth = 16
hw.lcd.density = 420
hw.lcd.backlight = true
hw.gpu.enabled = false
hw.gpu.mode = guest
hw.gpu.blacklisted = no
hw.initialOrientation = Portrait
hw.camera.back = emulated
hw.camera.front = emulated
vm.heapSize = 256
hw.sensors.light = true
hw.sensors.pressure = true
hw.sensors.humidity = true
hw.sensors.proximity = true
hw.sensors.magnetic_field = true
hw.sensors.orientation = true
hw.sensors.temperature = true
hw.useext4 = true
kernel.path = ./system-images/android-23/google_apis/x86//kernel-ranchu
kernel.newDeviceNaming = yes
kernel.supportsYaffs2 = no
disk.ramdisk.path = ./system-images/android-23/google_apis/x86//ramdisk.img
disk.systemPartition.initPath = ./system-images/android-23/google_apis/x86//system.img
disk.systemPartition.size = 1280m
disk.dataPartition.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img
disk.dataPartition.size = 2g
disk.encryptionKeyPartition.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/encryptionkey.img
avd.name = Nexus_5X_API_23
.
QEMU options list:
emulator: argv[00] = "emulator/qemu/darwin-x86_64/qemu-system-i386"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "75.75.75.75,75.75.76.76"
emulator: argv[03] = "-serial"
emulator: argv[04] = "null"
emulator: argv[05] = "-cpu"
emulator: argv[06] = "android32"
emulator: argv[07] = "-enable-hax"
emulator: argv[08] = "-m"
emulator: argv[09] = "1024"
emulator: argv[10] = "-lcd-density"
emulator: argv[11] = "420"
emulator: argv[12] = "-kernel"
emulator: argv[13] = "./system-images/android-23/google_apis/x86//kernel-ranchu"
emulator: argv[14] = "-initrd"
emulator: argv[15] = "./system-images/android-23/google_apis/x86//ramdisk.img"
emulator: argv[16] = "-object"
emulator: argv[17] = "iothread,id=disk-iothread"
emulator: argv[18] = "-drive"
emulator: argv[19] = "if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/system.img.qcow2,read-only"
emulator: argv[20] = "-device"
emulator: argv[21] = "virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify"
emulator: argv[22] = "-drive"
emulator: argv[23] = "if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img.qcow2,l2-cache-size=1048576"
emulator: argv[24] = "-device"
emulator: argv[25] = "virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify"
emulator: argv[26] = "-drive"
emulator: argv[27] = "if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img.qcow2,l2-cache-size=1048576"
emulator: argv[28] = "-device"
emulator: argv[29] = "virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify"
emulator: argv[30] = "-drive"
emulator: argv[31] = "if=none,overlap-check=none,cache=unsafe,index=3,id=encrypt,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/encryptionkey.img.qcow2,l2-cache-size=1048576"
emulator: argv[32] = "-device"
emulator: argv[33] = "virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify"
emulator: argv[34] = "-drive"
emulator: argv[35] = "if=none,overlap-check=none,cache=unsafe,index=4,id=sdcard,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img.qcow2,l2-cache-size=1048576"
emulator: argv[36] = "-device"
emulator: argv[37] = "virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify"
emulator: argv[38] = "-netdev"
emulator: argv[39] = "user,id=mynet"
emulator: argv[40] = "-device"
emulator: argv[41] = "virtio-net-pci,netdev=mynet"
emulator: argv[42] = "-netdev"
emulator: argv[43] = "user,id=mynet2,net=10.0.3.0/24"
emulator: argv[44] = "-device"
emulator: argv[45] = "virtio-net-pci,netdev=mynet2"
emulator: argv[46] = "-show-cursor"
emulator: argv[47] = "-L"
emulator: argv[48] = "emulator/lib/pc-bios"
emulator: argv[49] = "-soundhw"
emulator: argv[50] = "hda"
emulator: argv[51] = "-vga"
emulator: argv[52] = "none"
emulator: argv[53] = "-append"
emulator: argv[54] = "qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=2 qemu.encrypt=1 cma=32M ndns=2"
emulator: argv[55] = "-android-hw"
emulator: argv[56] = "/Users/mac/.android/avd/Nexus_5X_API_23.avd/hardware-qemu.ini"
Concatenated QEMU options:
emulator/qemu/darwin-x86_64/qemu-system-i386 -dns-server 75.75.75.75,75.75.76.76 -serial null -cpu android32 -enable-hax -m 1024 -lcd-density 420 -kernel ./system-images/android-23/google_apis/x86//kernel-ranchu -initrd ./system-images/android-23/google_apis/x86//ramdisk.img -object iothread,id=disk-iothread -drive if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/system.img.qcow2,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=3,id=encrypt,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/encryptionkey.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=4,id=sdcard,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -netdev user,id=mynet2,net=10.0.3.0/24 -device virtio-net-pci,netdev=mynet2 -show-cursor -L emulator/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=2 qemu.encrypt=1 cma=32M ndns=2' -android-hw /Users/mac/.android/avd/Nexus_5X_API_23.avd/hardware-qemu.ini
emulator: Starting QEMU main loop
Hax is enabled
Hax ram_size 0x40000000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'both'
emulator: Adding boot property: 'ro.opengles.version' = '131072'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '256m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.adb.secure' = '1'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '420'
HAX is working and emulator runs in fast virt mode.
emulator: goldfish_events.have-dpad: false
emulator: goldfish_events.have-trackball: false
emulator: goldfish_events.have-camera: true
emulator: goldfish_events.have-keyboard: true
emulator: goldfish_events.have-lidswitch: false
emulator: goldfish_events.have-touch: false
emulator: goldfish_events.have-multitouch: true
emulator: control console listening on port 5554, ADB on port 5555
Not using any http proxy
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized
emulator: onGuestSendCommand: [0x7f80950cdc00] Adb connected, start proxing data
**UPDATE
output logged:
emulator: _hwFingerprint_connect: connect finger print listen is called
emulator: got message from guest system fingerprint HAL
in the last 30 minutes.
Android shows laggy screen that said "Starting Android Process", then 30 minutes later showed frozen screen that stated the system UI is not responding, with a allow debugging dialog behind it. See images. When I click, the UI is not responding and the logs are not outputting anything beyond what I posted.
This one worked for me
Delete all AVD's that you currently have.
Go to Preferences >> Android SDK >> SDK Tools
Uninstall Android Emulator
Restart Android Studio.
Re-install Android Emulator from the same place.
Create a new emulator !
Hope this Helps.
Do you have Docker for Mac installed by any chance? I was just facing the exact same issue and stopping Docker fixed the problem...
You could also try launching the emulator from the command line.
cd $ANDROID_SDK_ROOT
tools/emulator -list-avds
tools/emulator #name_of_avd -verbose
If you see any failures you can share the output of the last command. The ANDROID_SDK_ROOT environment value should point to the android SDK location. You can find this in android studio under the menu tools->sdk manager.
I got this problem when updated to MacOS Big Sur, what worked for me was to update Android Emulator in SDK Tools.
Android Studio -> Preferences -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools -> Select Android Emulator -> OK
Here's what finally worked for me:
In Android Studio (Mac OS X) open up AVD Manager. Click the triangle pointing downwards on the offending Android Virtual Device to get a drop-down menu. Then, strike down upon Delete with great vengeance and furious anger.
With that out of the way, click + Create Virtual Device…. Leave most settings on default and then run your new virtual device like it is a tasty burger.
Hopefully this will work for you too. ^^
For me, changing the 'Graphics' from 'Automatic' to 'Software - GLES 2.0' in the Virtual Device Configuration , worked form me on my macOS Sierra
Another option if the emulator just crashes before launching the main window on mac: as varun mentioned, Docker running will be one culprit, and something else that uses vcpu’s, in my case - Virtualbox. Make sure to kill all vbox... processes.
On my old Mac (mid 2010 2,8Ghz i5) I had same problem and I want to share my solution with community for future use:
Uninstall all AVD from list.
Download last version of HAXM https://github.com/intel/haxm [update 03.03.2019]
Install it manually (it will uninstall previous version automatically by request)
Generate new AVD for x86 image.
[update 03.03.2019] For more information https://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture
I had the same issue and was running El Capitan. I tried all of the above solutions listed but none of them worked and couldn't get the emulator to work.
So then I looked up the error log and as expected it was due to incompatible libs. Here's a snapshot of the log:
Process: qemu-system-x86_64 [891]
Path: /Users/USER/Library/Android/*/emulator
Identifier: qemu-system-x86_64
Version: ???
Code Type: X86-64 (Native)
Parent Process: studio [801]
Responsible: qemu-system-x86_64 [891]
User ID: 501
Date/Time: 2020-03-24 16:45:31.709 -0400
OS Version: Mac OS X 10.11.6 (15G22010)
Report Version: 11
Anonymous UUID: C6045A70-81F1-1E8A-7E49-13842E8765D9
Time Awake Since Boot: 1000 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/Users/patel/Library/Android/sdk/emulator/lib64/qt/lib:/Users/patel/Library/Android/sdk/emulator/lib64/gles_swiftshader:/Users/patel/Library/Android/sdk/emulator/lib64/gles_angle11:/Users/patel/Library/Android/sdk/emulator/lib64/gles_angle9:/Users/patel/Library/Android/sdk/emulator/lib64/gles_angle:/Users/patel/Library/Android/sdk/emulator/lib64
Dyld Error Message:
Symbol not found: _kSecAttrKeyTypeECSECPrimeRandom
Referenced from: /Users/USER/Library/Android/*/libQt5WebEngineCoreAndroidEmu.5.12.1.dylib (which was built for Mac OS X 10.12)
Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
in /Users/USER/Library/Android/*/libQt5WebEngineCoreAndroidEmu.5.12.1.dylib
You may notice the line
Referenced from: /Users/USER/Library/Android/*/libQt5WebEngineCoreAndroidEmu.5.12.1.dylib (which was built for Mac OS X 10.12)
So, I upgraded to High Sierra and the issue went away.
This worked for me; I am using OS EL-Capitan, I don't want to upgrade to High Sierra, I can't use android studio emulator after upgrade because of an error like this:
Emulator: Sorry, "qemu-system-x86_64" can not be run on this version
of macOS. Qt requires macOS 10.12.0 or later
Solved in 2 steps:
Delete folder sdk on :
/Users/[username]/Library/Android/sdk
Restore folder sdk with before. There are some places to download on the Internet
After updating DisplayLink Manager to 1.1.0 with macOS Catalina (10.15.6) no emulator would start. The emulator didn't show up in a window it was just the icon on the menu bar. I checked all the previous solutions and nothing worked.
After I unplugged the docking station, the emulator started normal and I could plug the docking station again.
I've updated #Saneesh answer for Android studio 4+
Delete all AVD's that you currently have.
Go to Preferences >> Appearance & Behavior >> System Settings >> Android SDK >> SDK Tools
Uninstall Android Emulator
Restart Android Studio.
Re-install Android Emulator from the same place.
Create a new emulator!

created the nexus 5 emulator in android studio its show only black screen?

I created the nexus 5 and nexus 7 emulator in android studio. I launch the both emulator one by one. Nexus 7 emulator is working fine but in nexus 5 contains only the black screen i waited more than 1 hour. what was the problem.
It shows the message in:
emulator: device fd:628
HAX is not working and emulator runs in emulation mode
emulator: The memory needed by this AVD exceeds the max specified in your HAXM configuration.
emulator: AVD RAM size = 1536 MB
emulator: HAXM max RAM size = 512 MB
emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.
The details of nexus 5 emulator
Name: Nexus_5_API_21 CPU/ABI: Intel Atom (x86) Path: C:\xxx.android\avd\Nexus_5_API_21.avd
Target: Android 5.0.1 (API level 21)
Skin: nexus_5
SD Card: \Nexus_5_API_21.avd\sdcard.img
Snapshot: yes hw.dPad: no runtime.network.speed: full hw.accelerometer: yes hw.device.name: Nexus 5 vm.heapSize: 64 skin.dynamic: yes hw.device.manufacturer: Google hw.gps: yes hw.audioInput: yes tag.id: default hw.camera.back: none hw.mainKeys: no AvdId: Nexus_5_API_21 hw.camera.front: none hw.lcd.density: 480 runtime.scalefactor: auto avd.ini.displayname: Nexus 5 API 21 snapshot.present: yes hw.device.hash2: MD5:2fa0e16c8cceb7d385183284107c0c88 hw.ramSize: 1536 hw.trackBall: no hw.battery: yes hw.sdCard: yes tag.display: Default runtime.network.latency: none hw.keyboard: yes hw.sensors.proximity: yes disk.dataPartition.size: 200M hw.sensors.orientation: yes avd.ini.encoding: UTF-8 hw.gpu.enabled: no
The error suggests that the maximum RAM size supported by the HAXM is 512 MB.Try bringing down the size of the emulator RAM to 512 MB.This solved the issue for me.

Resources