pheromix
pheromix

Reputation: 19287

Emulator process killed while launching

I am using Android Studio 2.2.3

I created a very simple project with the basic activity.

When I run the project then there was this error in the Run tab : Error while waiting for device: The emulator process for AVD Nexus_5X_API_25_x86 was killed.

My computer is windows7 64-bit , RAM 4Gb , virtualization is enabled. There is the antivirus Avast running.

So what should I do to prevent this process killing ?

Upvotes: 8

Views: 28293

Answers (9)

ezequielgm25
ezequielgm25

Reputation: 1

I had this issue! if you are not running out of space! check the logs by going to Help -> Show Log in Explorer! I got that "the Avd's CPU Architecture was not supported " so I went to device manager for the virtual device go to edit and I changed the image architecture I set a X86 image and it worked!

Upvotes: 0

Developer Kannan
Developer Kannan

Reputation: 11

  1. Open folder (C:\Users\<username>\.android).
  2. Create a file (advancedFeatures.ini).
  3. Add these lines in the file (advancedFeatures.ini).
Vulkan = off
GLDirectMem = on
  1. Now start the AVD Manager.

Upvotes: 1

Faisal Khawaj
Faisal Khawaj

Reputation: 11

I was also facing the same problem in MacBook pro M1(macOS Big Sur) and i spent alot of time in fixing this. The solution is simple, I downloaded the android emulator-m1-preview and Android Studio Preview(Arctic Fox) which is specifically for m1.

https://github.com/google/android-emulator-m1-preview developer.android.com

Upvotes: 0

It is an Android Studio Bug in this version(4.1)!

Easy Solution: go to File-> Settings -> emulator then Uncheck "Launch in a tool window".

That Worked for me!

Upvotes: 2

Shlomi
Shlomi

Reputation: 367

The issue might related to the the GPU drivers,
The problem is that emulators with Google Play feature,
You can't change from hardware to software,
Try this using PowerShell or CMD window: (Change user and emulator names accordingly)

C:\Users\user\AppData\Local\Android\Sdk\emulator> .\emulator.exe -avd Pixel_4_API_30 -gpu swiftshader_indirect

It will start the emulator using the software,
The disadvantage of this solution is that you need to keep the CMD or PS window open,
No big deal for me.

Upvotes: 0

Habib Kazemi
Habib Kazemi

Reputation: 2190

This problem has multiple reasons, to properly solve this issue go to Help -> show log in **** then open the log file and search the word "Emulator" in that file. for example, I found this error in the log file 2020-12-27 22:42:58,708 [114439053] INFO - manager.EmulatorProcessHandler - Emulator: emulator: ERROR: Not enough disk space

and the problem solved by making some space.

Upvotes: 19

yaroze
yaroze

Reputation: 91

If everything else fails, try to run the emulator manually through the command line to see what made it crash. In my case it was due to the lack of free space on C:. The solution was to free up some space and it went back to life.

C:\Users\<user>\AppData\Local\Android\Sdk\emulator>emulator.exe -avd Pixel_3a_API_30_x86
        emulator: ERROR: Not enough space to create userdata partition. Available: 3853.097656 MB at C:\Users\<user>\.android\avd\Pixel_3a_API_30_x86.avd, need 7372.800000 MB.
        
        
C:\Users\<user>\AppData\Local\Android\Sdk\emulator>

Upvotes: 8

we_mor
we_mor

Reputation: 518

I had the same issue, but then I realized that my Windows user directory name i.e. C:\Users\myUserName, wasn't written in English characters, to be exact it had Greek characters, so I changed the directory's name and then the emulator launched.

The emulator is searching inside this directory, because in there the .android directory is stored, that contains the emulator's data 'C:\Users\myUserName\.android\avd'.

So keep that in mind, probably it has to do with a directory name or something.

Edit:

You can move the .android folder to another drive like (E:). If you do that, you have to add some environment variables to your system. For more info check the link below:

Link here

Upvotes: 2

snehatilak
snehatilak

Reputation: 777

ERROR Android emulator gets killed

This worked for me:

Tools -> SDK Manager -> SDK Tools (tab) -> Deselect 'Android Emulator' -> OK

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.

Upvotes: 14

Related Questions