Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio AVD causes avd to crash and AS closes without warning

I'm running latest beta Android Studio 4.2 Beta 3. Each time I try to click on the run button to start my AVD, the AVD does not start and will cause Android Studio to crash. I do not have HAXM installed and I am running MacOS Catalina (10.15.7 (19H114))

Trying to run emulator from terminal causes this to print out:

emulator: Android emulator version 30.4.1.0 (build_id 7075546) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library /Users/weijie/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
added library /Users/weijie/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library /Users/weijie/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
added library /Users/weijie/Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib
zsh: terminated  ./emulator -avd Pixel_3a_API_30_x86

I would appreciate any suggestions from the community. Thanks.

like image 905
weijie016 Avatar asked Jan 20 '21 22:01

weijie016


People also ask

Why does my Android Studio keeps crashing?

If you use an emulator to use Android Studio, the app will likely crash suddenly. In most cases, the emulator problems like update issues, incompatibility, and insufficient RAM can suddenly stop working applications. Besides, if your emulator's Android version is old, the Android Studio can crash when you run it.

Why my AVD is not working?

In case you get an error like "Intel virtualization technology (vt,vt-x) is not enabled". Go to your BIOS settings and enable Hardware Virtualization. 3) Restart Android Studio and then try to start the AVD again.

How do you fix an app that keeps crashing on Android Studio?

The easiest way to fix an app that keeps crashing on your Android smartphone is to simply force stop it and open it again. To do this, go to Settings -> Apps and select the app that keeps crashing. Tap on the app's name and then tap on 'Force stop'. Now try opening the app again and see if it works well.


Video Answer


1 Answers

Change two lines in this file: ~/.android/avd/Pixel_3_API_29.avd/config.ini

hw.gpu.enabled = yes
hw.gpu.mode = software

Replace "Pixel_3_API_29" with whatever the name of your image is. It has something to do with Vulkan and Metal. I guess the Android Studio developers aren't testing their software updates on older Macs.

like image 125
detune Avatar answered Oct 19 '22 20:10

detune