The Android emulator began to slow down - android-studio

For no reason my emulator began to slow down. Each action occurs with a delay. And when the emulator starts, this message is displayed.
Some users have experienced emulator stability issues with this driver
version. As a result, we're selecting a compatibility renderer. Please
check with your manafacturer to see if there is an updated driver
available.
I tried to change the driver of the video card and create a new emulator, this does not help.

The solution for me:
Open your SDK Emulator folder (e.g. C:\Users\username\AppData\Local\Android\Sdk\emulator )
Open Command Line window here
Enter the: emulator -list-avds (to see a list of available emulators)
Enter the: emulator -avd {name_of_emulator} -gpu host (for the forced-choice hardware gpu)
You will see a warning again, but just ignore it.
The emulator will no longer slow down

For my solution I did
In your emulator, click more
Select setting
in advance tab
change the OpenGL ES renderer to 'Desktop Native OpenGL

Related

Android Studio Emulator no more considering Swipes on Notebook Touchscreens as Input

I upgraded to Android Studio Bumblebee 2021.1.1 and realized that I cannot fully control the emulator with the touchscreen of my notebook anymore. Press events on the touchscreen (like mouse clicks) are still recognized correctly, but when I swipe nothing happens in the emulator.
Unfortunately, I did not note down the previous version of Android Studio that I had installed before, but with previous Android Studio versions I was always able to fully control the Android emulator via the touchscreen (as if I was actually testing my app on a real mobile phone).
My Google searches did not show any results related to this issue. Does anyone have an idea what the root cause could be and if it is possible to fix it?
Disabling launch in tool window in Settings::Tools::Emulator fixed it for me (requires emulator restart to take effect).
Credits to YuriBlaise on reddit

Android Studio 3.3.1 Emulator bug

I'm a new Android Studio user, but I've already done something in the last few days.
I have only a problem with the emulator. I tried to run my code with a normal Virtual Device, but every time I always got the same error:
Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
Emulator: Process finished with exit code 1
I tried to find a solution in the internet, and I found that the problem was my computer (it is an AMD) and I had to download the "armeabi" version when I created a new virtual device.
It worked (I have no more errors), but my emulator is always black and I cannot see anything. I was forced to use Debug USB on my personal phone, to plug in and use it (and it works) but I'd like to solve the problem with the Android Studio emulator. My Android Studio version is 3.3.1, the latest.
Obviously when I have a preview clicking on the file "activity_main.xml" I can see the right output.
Normally I use Nexus 5 and I've tried with Marshmallow and Nougat.
Increase your VM Heap & try it again.
Tools -> Android -> AVD Manager.
Select a virtual device and click on its pencil icon (edit)
Click on Show Advanced Settings.
Under "Memory and Storage" change "VM Heap"
If above is not helpful, Please Check "Wipe user data" in the Launch Option
Go to Android Virtual Device Manager->Select your device->Start->Check "Wipe user data"->Launch
make sure that Intel x86 Emulator Accelerator is active

Android Studio guest hasn't come online in 7 seconds

When I first start the emulator in Android Studio I get an information message,
guest hasn't come online in 7 seconds retrying
I am curious as to how to stop this because while it is on my screen for about 40 seconds I cannot do anything in the emulator.
Actually 'Cold Boot Now' may work in this situation
I had the same problem. Selecting Cold Boot Now in AVD manager solves the problem.
But I have to open AVD manager each time when I want to launch Emulator and I just want to click on Run app button and select device, without opening AVD manager.
To solve this: open AVD manager -> Edit device -> Show Advanced Settings -> Boot option -> select Cold Boot instead of Quick boot.
tools->Android->AVD Manager
Choose the device then Cold Boot Now
maybe it's bug from intel haxm 6.2.1, because after i update i got same problem.
I solved by recreate emulator and testing again
I managed to solve this issue by updating the .ini file manually. (I was not able to find a corresponding setting in the GUI.)
The location of the .ini file, relative to your home directory, is:
~/.android/avd/MyDevice.avd/config.ini
where MyDevice refers to the configured device name.
Depending on your operating system, you may find your home directory according https://en.wikipedia.org/wiki/Home_directory.
Change the entry within config.ini from no to yes:
fastboot.forceColdBoot=yes
I specified AVD memory 2048 Mbyte instead of 1536 Mbyte. Things
started to work again. (I'm developing on macbook.)
I tried "Kuldeep Chandel" solution which is to duplicate AVD and my app runs again too. Because of that I specified RAM again as 1536
Mbyte. Guess what... It worked...
I think AVD confuses to handle things and we need to duplicate the current AVD, and use it instead of the problematic one.
In "Your Virual Device" - Click on Duplicate OR Duplicate your Device. It will work like Charm.
I faced this issue on using Android API 28 emulator with Android Studio 3.0.1. Android API 28 requires Studio 3.1 and above. Once I updated Studio to 3.1.4 and Android Emulator to the latest version, it worked.
Seting default settings for problem device from Android Device Manager resolved issue for me.

Hololens emulator mouse input not captured

In Hololens Emulator with Windows 10 Pro, I can only use keyboard strokes and my mouse is not recognized. How can I turn on mouse input? I did nothing to connect my keyboard, so why is it with a mouse that I have to change something?
One problem that may solve it: make sure when using the emulator that in Package.appxmanifest in Visual Studio the MaxVersionTested line is the correct version. I was looking at an older version which everyone says to use: 10.0.10586.0 which was incorrect. When choosing the device for debugging, the version will be in the name. Currently, the most updated version (that I am using) is 10.0.14342.1018. After that, start debugging and run the emulator and you should have keyboard and mouse input!
I had the same problem, but I'm not sure how I solved it. Here is what I have done:
Installed Update 3 for VS 2015. Tried again without restarting the PC and got the same problem. On the next day I started the HoloLens Emulator directly via Hyper-V Manager. After that I started my project in Visual Studio. The Emulator loaded correctly and now the Human Input and Keyboard and Mouse Input buttons are enabled.
Update: That was definitely not the answer, but I found a working solution here:
http://forums.hololens.com/discussion/952/no-input-from-emulator
Just put off your proxy in IE and the icons will be enabled. I could turn my proxy on again and the controls remained active.

Android Emulator failed to launch, might caused by not supporting extended desktop

I have been frustrated with Android Emulator for weeks after using x86 emulator. The emulator showed with blank screen for hours even if the LogCat indicate it is running, but I am afraid the application was trapped in a dead loop.
To correct this problem, I have re-installed all my computer and android developing environment, and follow every instructions I could get by searching the internet; while the result was frustrating: there was only one "system_process" running on the emulator.
Then today I noticed there is a SystemUI error, thus I guess if this is caused by the PC configuration when I was using extended desktop. So I detached my laptop from the dock and re-launched the emulator, this time it cost only about 10 seconds to get all the processes ready to simulate android phone.
So I guess there is a bug to handle PC with extended desktop enabled. If you have got similar problem when launching Android Emulator, please try detach your PC from the second display first.

Resources