Android Studio Emulator and "Process finished with exit code 0"

AndroidAndroid StudioAndroid Emulator

Android Problem Overview


I've updated android studio from 3.0 to 3.0.1 but when I launch Emulator it didn't get launched and gives message in event log:

Emulator: Process finished with exit code 0

Android Solutions


Solution 1 - Android

You need to check:

  • Your size on disk is not full - this's often happen due to creation of some virtual devices that are unused

  • The RAM size of emulator is not minimum as your requirements

One more thing that I personally use: Use Pen Drive as a RAM


Updated:

Use HDD as RAM

> - Right Click on “This PC or My Computer” and Select Properties. > > - Now Click on “Advance System Settings”. > > - Now in “System Properties” you have to select “Advanced” tab. > > - Now click on “Settings” Under “Performance”. > > - Now in “Performance Option” again you have to select “Advanced” tab. > > - Now click on “change“ under “Virtual Memory”. > > - Un-check “Automatically manage paging file size of all drivers” and select “Custom size”. > > - In Custom Size enter the amount of data According to “Space available” which is written there. > > - Click on “set” button and Click on OK. > > - Now it will ask you to restart your Computer or Laptop.


Another work around steps (tested) :

  1. Restart your Android Studio
  2. Create new device in your AVD Manager
  3. Increase the RAM size of the Emulator

Solution 2 - Android

I restarted Android Studio and create a new device in AVD MANAGER then I have increased the RAM size of emulator and it works nicely.

UPDATED Sometimes it happens when you close emulator during building the App in to emulator.

Solution 3 - Android

I also faced the same error. After a few hours I figured it out.

I hope it helps you :

Go to Tools ==> SDK Menager ==>Android SDK

(Appearange&Behavior=>System settings=>Android SDK)==>SDK Tools==>Intel x86 Emulator Accelerator(install this).

It will solve your problem.I hope it helps.

You can look at pictures which you must install

Solution 4 - Android

I had this problem and it took me nearly 2 days to resolve...

I had moved my SDK location, due to the system drive being full, and it seems that someone, somewhere at Android Studio central has hard-coded the path to the HaxM driver installer. As my HamX driver was out of date, the emulator wouldn't start.

Solution: navigate to [your sdk location]\extras\intel\Hardware_Accelerated_Execution_Manager and run the intelhaxm-android.exe installer to update yourself to the latest driver.

Solution 5 - Android

I had this issue in Android Studio 3.1 :

I only have on board graphics. Went to Tools -> AVD Manager -> (Edit this AVD) under Actions -> Emulated Performance (Graphics): select "Software GLES 2.0".

Solution 6 - Android

In AVD Manager,

Go to Edit Icon on AVD Manager for selected Device.

Click on show advanced settings and increase ram size from 1500 mb to 2 GB.

Then it works.

NOTE: Some virtual devices do not allow you to update RAM, but if so, try installing Nexus 4. because it does.

NOTE2: If still doesnt work, dont give up. just uninstall and reinstall the device with changing RAM again. in some cases this is how it works

NOTE3: If still doesnt work, this means your pc doesnt have enough ram space. so increase the ram to 3gb. it might work but it will suffer

NOTE4: If still doesnt work, try it with multicore 2 instead of 4.

NOTE5: Still doesnt work. Close the Android Studio and NEVER open it back :)

Solution 7 - Android

Docker installation selected Hyper-V on windows by default. Deselect the Hyper-v b

This worked for me.

enter image description here

Solution 8 - Android

I was able to get past this by making sure all my SDKs were up to date. (Mac OS 10.13.3, Android Studio 3.0.1). I went to Android Studio -> Check for Updates... and let it run. Once my Android 5.0/5.1 (API level 21/22) SDKs were updated to revision 2: Preferences screen showing updated Android 5.0 and 5.1 SDKs

After doing this update, I was able to run the emulator without crashing out immediately with a "Emulator: Process finished with exit code 0" error.

Solution 9 - Android

None of the solutions worked for me. I upgraded my previous Android Studio to 3.0.1 and received this issue while trying to restart the emulator.

What worked for me was deleting Android Studio from Windows 'Add or Remove Programs'. Then go to C:\Users[User] and delete any android-related folders (.android, .AndroidStudioX.X, Android).

Next go to C:\Users[User]\AppData\Local and delete any Android-related folders there. Restart your system and re-download android studio from their official site (https://developer.android.com/studio/index.html). Install Android Studio from fresh and don't import any old settings.

When Android Studio finishes installing, I launched AVD from 'Tools > Android > AVD Manager', created a pixel 2 device with 4096mb of RAM running Android API P x86. Start it up and it works!

Solution 10 - Android

This can be solved by the following step:

Please ensure "Windows Hypervisor Platform" is installed. If it's not installed, install it, restart your computer and you will be good to go.

enter image description here

Solution 11 - Android

Android Studio Emulator: Process finished with exit code 1. Maybe disk drive is FULL. You can delete some virtual devices unused. It works for me. it's next to the edit in your virtual manager devices menu (the arrow down)

Solution 12 - Android

I also had the same problem.I fix this problem by editing Graphics of AVD. Tools > Androids > AVD Manager > Actions > Edit > Show Advance Settings > Graphics -> Software. I hope this solution help u!

Solution 13 - Android

You can try to delete the emulator and reinstall it this usually does the trick for me. Sometimes you also run into hiccups on your computer so try restarting your computer. Your computer may not be able to handle android studio if so there is nothing you can do. Consequently, you may not have the right ram requirements. Finally, If all else fails you can try to delete then reinstall android studio.

Solution 14 - Android

I solved this issue by offing all of advantage features of my graphics card in its settings(Nvidaa type). It started to throw such hanging error less a lot. But finally I found a simplier way: In avd manager you need to put less resolution for the avd. Say, 400x800. Then I reenabled graphics card features again and now it runs all ok. (I suspect my graphics card or cpu are weaker than needed. )

Solution 15 - Android

In my case, Emulator: Process finished with exit code 0 error started after I pressed on Restart in the Emulator.

It happened because in Android Studio 3.0 and up versions, the emulator saves the states of the current screen to launch it very quickly at next time. So when I pressed on Restart it closes emulator by saving state as Restart. So when I launch/start the emulator, it executes the Save States as Restart and then after emulator is not started automatically. So basically it stuck in to Save States of Restart.

I don't want to delete existing emulator and create a new one.
My default Boot Option of Emulator was Quick boot in AVD.
By doing Cold Boot Now from AVD (Android Virtual Device) Manager, it starts emulator again in normal mode without Save State.

enter image description here

Cold boot start emulator as from power up.

Solution 16 - Android

I was getting the following error when starting the emulator and none of the answers fixed it.

Emulator: Process finished with exit code -1073741515 (0xC0000135)

Finally I found that Visual C++ is not installed in my system. If it is not installed please install Visual C++ and check.

Please find the link below to download latest Visual C++.

https://support.microsoft.com/en-in/help/2977003/the-latest-supported-visual-c-downloads

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionWahdat JanView Question on Stackoverflow
Solution 1 - AndroidstefanView Answer on Stackoverflow
Solution 2 - AndroidWahdat JanView Answer on Stackoverflow
Solution 3 - AndroidAbdullah alkışView Answer on Stackoverflow
Solution 4 - AndroidLairdPlengView Answer on Stackoverflow
Solution 5 - AndroidOleView Answer on Stackoverflow
Solution 6 - AndroidsmoothumutView Answer on Stackoverflow
Solution 7 - AndroidAjay SView Answer on Stackoverflow
Solution 8 - AndroidZachary DrakeView Answer on Stackoverflow
Solution 9 - AndroidTomView Answer on Stackoverflow
Solution 10 - AndroidRuhulView Answer on Stackoverflow
Solution 11 - AndroidOnur BalliView Answer on Stackoverflow
Solution 12 - AndroidMayzar HlaingView Answer on Stackoverflow
Solution 13 - Androiduser9436035View Answer on Stackoverflow
Solution 14 - AndroidCodeToLifeView Answer on Stackoverflow
Solution 15 - AndroidViraj PatelView Answer on Stackoverflow
Solution 16 - AndroidKumar MView Answer on Stackoverflow