'Config swiftshader mode for emulator

I have a UI display problem on emulator only and some people say that it can be fixed by using swiftshader for emulator (https://github.com/mapbox/mapbox-gl-native/issues/10829)

I already tried to update the config.ini file to

hw.gpu.enabled = yes
hw.gpu.mode = swiftshader_indirect

but the emulator can not launch anymore, if it is hw.gpu.mode = auto, emulator will work fine.

I also tried to enable SwiftShader in GUI (Emulator -> 3 dots -> Settings - Advanced)

After that, all of my emulators can not launch. And I can't find anyway to revert this setting, so I need to reinstall AS.
I'm using Mac M1, Android Studio Bumblebee | 2021.1.1 Beta 5.
Is there anyway to enable swiftshader successfully?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source