If you are having issues with the Android emulator, like it not showing up on screen, then this guide will help you to fix it up.
Suppose you are developing an Android application, and when you run the application, it shows your Android app is successfully installed on a virtual device.
However, the emulator didn’t show up on screen, but the pop-up shows the app was installed successfully.
But where is it? No idea.
And let me guess: If you are here, then you are also facing a similar kind of issue, aren’t you? If yes, then let me take you through the steps that helped me bring back the Android Emulator from the shadows to the spotlight.
How to Fix the Issue?
When you try to check whether the emulator is running or not? Then the Android Studio screen will show the error “No emulators are currently running.
To launch an emulator, use the AVD Manager or run your app while targeting a virtual device,” despite the Android emulator being running.
This error sometimes occurs when the emulator is not closed forcefully because you are in a hurry to watch your favorite show…Oops!
Anyway, to avoid this, please power off the emulator properly.
Now that you have already committed a sin, then let me show you a way to fix this issue with the below guide, which will only work on the Linux platform for sure.
I can’t vouch for other OSes.
Steps to resolve Emulator Issue
First, go to the Tools menu. In the tool menu, select AVD Manager.
The Android Virtual Manager screen will be shown on your screen. Click on the play button which will be below the Actions tab.
Once you click on the play button, a pop-up will show up, and it will show you how to delete all the locked files in the specified directory.
A lock file is used to prevent applications from crashing during concurrent usage.
Open the terminal and pass the following command to remove the following locked file from your system, but make sure to replace the filename and path with the correct ones.
$ rm -rf /home/shen/.android/avd/Pixel_2_API_29.avd/*.lock
If you are not sure about the path and device name, you can follow the directory name from the pop-up dialog.
Now try to install and run the application, and I’m sure this time the emulator will show up.
That’s all for this article, where I share with you a simple way to fix the Android emulator issue on a Linux-based system. For any reason, if you are still facing issues, then do let me know in the comment section.fix android emulator
A man with a tech effusive who has explored some of the amazing technology stuff and is exploring more. While moving towards, I had a chance to work on Android development, Linux, AWS, and DevOps with several open-source tools.
My Android Emulator was not showing when running because its window was reduced down to the size of a dot on the Virtual Device Manager window. I happened to notice it and enlarged it by dragging on it. This was likely due to just shutting down android studio without shutting down the emulator first