32

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

Nils Reichardt
  • 2,025
  • 1
  • 11
  • 19
  • Had the same problem in Android Studio 2020.3.1 (non-beta) on Ubuntu. Turned out the disk partition containing `~/.android/avd` was full, so had to move+symlink it to a another partition with more space available. – Joel Purra Oct 13 '21 at 15:05
  • Had the same problem in Android Studio 2020.3.1 on Windows. Turned out the environment path `ANDROID_HOME` is occupied by scoop, a package manager in Windows, which will set the path automatically when install android-sdk, free the path by uninstall android-sdk package. – attolee Nov 10 '21 at 13:11

9 Answers9

51

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.

Joseph Saunders
  • 646
  • 6
  • 7
  • 1
    I already had installed 30.8 of android emulator but was getting errors. After reinstalling it, got working! fantastic – Mehrdad Shokri Sep 06 '21 at 11:09
  • 2
    Amazing, this worked! – Tuan Nguyen Quoc Oct 06 '21 at 10:37
  • 4
    Didn't work. Tried the exact steps, but it didn't work. – Ali Raza Nov 10 '21 at 07:34
  • I am just learning Android Dev, Im using IntelliJ I have 31.1.4 and still get the same errors – theMyth Nov 30 '21 at 00:09
  • 1
    In my case I was just running out of disk space. As soon as I changed the paths for the SDK and AVD to another drive it started working. – Franke Dec 11 '21 at 05:59
  • Work like a charm! Thank you! – Chris Ho Dec 20 '21 at 04:19
  • I was seeing this issue because I was on an M1 and for some reason, it had installed the emulator tools for an intel Mac. Following these steps fixed that as well. Thanks @Joseph Saunders! – Clark Sandholtz Mar 22 '22 at 18:43
  • I tried to uninstall the emulator and reinstall it. Since it was still running at the time, the uninstall failed. Interestingly HAXM seemed to uninstall, successfully, though, and when I reinstalled it, the error was fixed. I think there's a deeper underlying issue here and that the uninstall/reinstall sledge hammer fixes. – Code-Apprentice Apr 10 '22 at 14:57
  • 10/10 working in Electric Eel. I'd vote your answer up multiple times if I could. Cheers! – Alejandra May 18 '22 at 22:24
9

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
8

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

ARAVIND RAJ
  • 161
  • 1
  • 10
  • 6
    this happened to me, and freeing up storage space fixed the issue. Thanks, not sure why you had a negative vote here. – geochanto Mar 24 '22 at 01:40
3

I had the same Problems when using API > 29.

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

Android Studio SDK Manager

Faj5097
  • 41
  • 1
2

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

1

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!!

AmanDeepSharma
  • 2,040
  • 4
  • 18
  • 32
0

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

mefahimrahman
  • 117
  • 6
  • 22
0

I was having this issue on Windows. None of the proposed solutions worked. What did end up working was terminating the currently running adb.exe process. After killing it I was able to run AVD.

Sleewok
  • 143
  • 8
-4
  1. Download Android Studio for Mac (64-bit, ARM) https://developer.android.google.cn/studio?hl=id#downloads
  2. Copy Android Studio.app in your apps directory
  3. create mobile
Stefano Sansone
  • 2,001
  • 6
  • 12
  • 29