Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: "The emulator process for AVD Pixel_2_API_30 has terminated." on MacBook Pro M1 (Apple Silicon)

I have a problem to start an Android Emulator on my MacBook Pro M1 (Apple Silicon). When I try to start an emulator (API 30, CPU/ABI arm64), I get this error: "The emulator process for AVD Pixel_2_API_30 has terminiated."

I'm using 2020.3.1 Beta 5 of Android Studio.

Does anyone know how to solve this problem?

Error Message when starting an Android Emulator

like image 860
Nils Reichardt Avatar asked Jul 09 '21 07:07

Nils Reichardt


People also ask

Can you run Android Emulator on Mac M1?

As of August 2022, there are no Android Emulators available for the Apple M1 chip Macbook to play Android games or run apps. If you have an older version of Mac or an Intel-powered Mac, you can try Bluestacks. Bluestacks is currently the best Android Emulator available on Mac.

Does Android studio work on Mac M1?

Android Studio is not M1 Optimized Yet The Software that runs on M1 Chip is no longer Intel Chip, and hence need to be M1 Optimized first.

Does M1 Support emulator?

Install the emulator image for arm --> arm64-v8a (from Android Studio's Device Manager). Done - it should be working. I use M1 processor and the emulator works just fine. You don't need any m1-emulator-preview from github.

What happened to AVD pixel_2_api_30 emulator?

Android Studio: "The emulator process for AVD Pixel_2_API_30 has terminated." on MacBook Pro M1 (Apple Silicon) - Stack Overflow Android Studio: "The emulator process for AVD Pixel_2_API_30 has terminated." on MacBook Pro M1 (Apple Silicon)

Why does AVD pixel_3_api_24 display an error while waiting for device?

Error while waiting for device: The emulator process for AVD Pixel_3_API_24 has terminated. I've tried deleting and redownloading the files as well as making sure that all the proper tools like - Android Emulator and Android SDK tools are downloaded.

How do I fix the 'install emulator' error in AVD Manager?

Now, when you try to run your app, or launch device from AVD Manager, it will give the 'Install Emulator' error -> Click Ok. This will automatically download the correct version. Use an arm64-v8a image ! Choose any device that has the Google Play Store icon and click Next When NDK runs into Unknown host CPU architecture: arm64 you can solve it here

Why doesn't the emulator work with API 29?

Same problem, emulator closes with API 30 and above, API 29 and below works, maybe is an issue with HAXM and old intel processors (im using an old core i7 930) Check if the sdk path are correct, in the Environment variables. Press window key & type "env" to open environment variables.


7 Answers

It would seem due to the fact you are using a beta version of android studio the message "The emulator process for AVD Pixel_2_API_30 was killed." has been changed to "The emulator process for AVD Pixel_2_API_30 has terminated." but fundamentally they should still have the same solutions the most common solution being:

"All of the answers are too confusing to follow. Replace SDK or upgrade OS. The quickest way I found is to:

Tools > SDK Manager > SDK Tools

De-select Android Emulator, then click Apply. - The Android Emulator will be deleted.

Now, by default the Emulator version shown will be 30.6.5. Select the checkbox and click apply. This version of emulator will be installed.

That is it, just 2 minutes of you time.

Update: 1 Jul 2021 Issue solved with latest Emulator version 30.7.5"

Credits to: Karan Sharma in the post found here

If this does not fix the error then there are a multitude of different solutions that can be found by googling "Android studio MacBook emulator process for AVD was killed." or simply downgrading/upgrading your emulator works too, because it is a common issue with the v30.6.x emulator versions.

like image 130
Joseph Saunders Avatar answered Oct 24 '22 08:10

Joseph Saunders


Believe me you are not gonna trust me. I am just faced this issue in my windows machine. Nothing was worked. I am wasted my two days to solve this error but no result. Then I just try this solution And boom It worked.

You just need to Create the file ~/.android/advancedFeatures.ini (for Windows users path should be C:\Users\Dane\.android\advancedFeatures.ini) with the following content:

# Here's how to disable Vulkan apps to talk to the emulator.

# Add the following lines to ~/.android/advancedFeatures.ini (create this file if it doesn't exist already):

Vulkan = off
GLDirectMem = on
like image 45
ShraOne Devade Avatar answered Oct 24 '22 07:10

ShraOne Devade


Sometimes it's happens lack of storage. Make free space in your hard disk.

like image 32
ARAVIND RAJ Avatar answered Oct 24 '22 06:10

ARAVIND RAJ


I had the same Problems when using API > 29.

So I installed the SDK Platforms API 29 and it worked.

Android Studio SDK Manager

like image 8
Faj5097 Avatar answered Oct 24 '22 07:10

Faj5097


Please check your .zshrc file in Mac (edit it by usign vim ~/.zshrc command) and remove any manually added path to ANDROID_HOME. Android studio should not have any conflicts with your existing Android paths.

If you are not using .zshrc file then it may be .bashrc file.

Once removed restart your Android Studio and avd. This worked like a magic!!

like image 6
AmanDeepSharma Avatar answered Oct 24 '22 06:10

AmanDeepSharma


Although this question has already being answered, I want to add how I've fixed this issue.

For me, I've to clean up all the data -

# Deletes All Android Studio related preferences
rm -Rf ~/Library/Preferences/Google/AndroidStudio*
rm -Rf ~/Library/Preferences/AndroidStudio*

# Deletes the Android Studio's plist file
rm -Rf ~/Library/Preferences/com.google.android.*

# Deletes the Android Emulator's plist file
rm -Rf ~/Library/Preferences/com.android.*

# Deletes main plugins 
rm -Rf ~/Library/Application\ Support/Google/AndroidStudio*
rm -Rf ~/Library/Application\ Support/AndroidStudio*

# Deletes all logs that Android Studio outputs
rm -Rf ~/Library/Logs/Google/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*

# Deletes Android Studio's caches
rm -Rf ~/Library/Caches/Google/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*

# Deletes older versions of Android Studio
rm -Rf ~/.AndroidStudio*

#Delete gradle files
rm -Rf ~/.gradle/

#Delete Android SDK tools
rm -Rf ~/Library/Android*
rm -Rf ~/.android

By running these command in terminal. Then I open Android Studio and download SDK and voilà It works

like image 3
mefahimrahman Avatar answered Oct 24 '22 07:10

mefahimrahman


I think this will helps. uninstall "Intel x86 Emulator Accelerator (HAXM installer)" and reinstall it.

Tools -> SDK Manager -> SDK Tools

credit https://www.youtube.com/watch?v=PFNDx2wdO4A&t=77s

like image 3
Fissha Lijalem Avatar answered Oct 24 '22 07:10

Fissha Lijalem