Can't change emulated performance of AVD in Android Studio - android

I can't change the graphics to software as I'm sure this is the fix for my AVD not launching.
The option is greyed out (see screenshot). Has anyone has experience with this? I couldn't find anyone who had the same issue.
I'm running the latest version of Android Studio on Ubuntu 17.04.

Actually, this problem seems to be limited to devices with Play Store available, so Nexus 5X and Nexus 5 images will be forced to use Automatic Graphics, but all other devices allow you to choose either Automatic, Hardware or Software graphics.
edit: I've just tested this today and it seems to no longer be the case. At least on MacOS with Android Studio 3.3.2, I can now make a Nexus 5X image with Play Store and Hardware Graphics. I'll do more testing at home later, on Windows and Linux to see if it's related to OS or graphics drivers.

I also think it's related to whether the Playstore is contained or not, but I cannot explain why.
Dielson Sales already gave the answer which worked for me - unfortunately only in a comment to this answer. I just thought it's worth to make a "real" answer out of it:
Edit the config.ini file of the AVD. Under Linux it's located under /home/<user>/.android/avd/<AVD-name>/config.ini
(in my case <AVD-name> is Nexus_5X_API_29.avd).
In a text editor change the lines
hw.gpu.enabled=no
hw.gpu.mode=auto
either to
hw.gpu.enabled=no
hw.gpu.mode=off
or to
hw.gpu.enabled=yes
hw.gpu.mode=host
This setting remains even if opened in the Android Virtual Device Manager of Android Studio. It's just not editable there.
I also tried this, which I found in another AVD:
hw.gpu.enabled=yes
hw.gpu.mode=software
But this is then changed to "no" / "off" by the Android Virtual Device Manager.
I didn't look any further so far. hw.gpu.mode=off worked for me. Otherwise my whole Kubuntu hangs (using the Nouveau driver, not the NVidia driver)

Seems like the problem was with the choosen VM. If I choose a Nexus 4, it runs just fine.

I am little late on this thread but following are my findings and solution. I am using Ubunut 18.04 and faced the same issue. The solution is to edit AVD and under Emulated Performance, change the grpahics to Software. The problem was that this option was disabled for me. I was unable to change graphics drop down.
I did some more research and found that while creating AVD if you choose default/existing device definition on first screen, you will not be able to edit graphics drop down.
The solution is to create a "New Hardward Profile" while creating AVD and use your new profile. Now, you will be able to edit "Grahics" drop down.
Hope this helps....

It seems all emulators with Play Store cannot emulated performance. I am using AS 4.0

Open Android Virtual Device Manager Android Studio, change VMHeap to 512, RAM to 4096 MB. Then restart Android Studio.

I think It's just a bug!
Solved the issue by selecting any virtual device had the option enabled and after finishing the installation I just clicked on edit and reselected the device I wanted and the option was still enabled.
Click on edit button from here.
Then change the device to the one you want.

For those who are still searching for solutions on how to make it work with an image containing google play store: install / update your GPU drivers solves the problem. On my Ubuntu 20 this was the issue.

I'm working on mac os - after i upgrade my os my emulator stoped working and one of the solution was to change the graphic settings from hardware to software - since i couldn't - came here ---> turns out Android Emulator HAXM on macOS High Sierra is left out from security reasons
follow this link : https://developer.android.com/studio/known-issues#deploy

Related

Android Studio Emulator Screen Flickers

I have a new laptop with configuration: -
List item
Windows 11 latest build
Ryzen 7 5800H
16GB DDR4 RAM
RTX 3060 Ti Mobile GPU
Latest Android Studio
Latest Android Emulator
I have tried reinstalling the android studio and its emulators but its the same issue. Is this related to the presence of AMD processor ?
I have some ongoing projects which are halted and would like the get this problem fix as soon as possiable.
I have to develop some flutter applications
Emulator Screen Image Here
Emulator Screen Image 2 Here
I think you can resolve this problem changing the render options to ones that best suit your system, test diffent values to find out what is best for you.
To reach this screen click on the 3 dots at the side of your emulator and then: Settings -> Advanced
Edit: I have used an computer with a Risen 5700G and a RTX3050 with no flickers, so It's probably a configuration issue, also check if you have virtualization enabled on your bios, it'll depend on the manifacturer of your motherboard so I can't provide clear guide on how to enable it on your system, if needed.
try to delete the current Emulator from .android/avd and install another one such as pixel 4 or pixel 3
It also works if you put the emulator in floating mode. At least it helped for me, and many others with similar problem. On he photos I only see that you have unpinned it, but not set it to "float".
Go to settings, view mode and then float:
I hope it helps, cheers!

Genymotion 3.0 trial version showing Black Screen on Windows 10

My Genymotion is showing black screen i have try all the methode of configuration by configuring correctly my virtual box adapter so i don't know what's wrong again.
I had the same problem and in my case the problem was the graphics card.
Genymotion requires reasonably recent graphic cards. In my case, my laptop graphic card was running with the generic graphics drives by MS. I updated the graphics driver in Windows Control Panel, and right after that the emulator worked.
Here is the official support page that lists a few of the possible causes and remedies for black screen:
https://www.genymotion.com/faq/#virtual-device-window-empty
You need to check 4 different things:
proxy connections to be off( Gennymotion/setting/Network)
SDK be set( Gennymotion/ABD/SDK)
Graphic card driver be successfully installed
Virtual box installed and working correctly
Try again please. hope you will fix it easily.

AVD Crash on second monitor

I just installed Android Studio and was trying to get a preview of my application but whenever i start the AVD Emulator on whatever devices or API it crashes, but it only do crash when I swipe the window of the AVD to my second monitor.
my computer configuration : i7-6700k, 16Gb RAM and a GTX 1060
the AVD configuration :
Anyone had the same problem in the past or have a solution ? feel free to ask me for more info in case I didn't explained enough
I had the same problem, and I found a solution that you can have the hardware acceleration still activated and move the AVD between monitors.
Here's how I did it:
Start the AVD.
Go to Extended Controls (the last button on the control strip, with the 3 dots) > Settings > Advanced
Change the "OpenGL ES renderer" to "ANGLE (D3D11)"
Restart the AVD.
And there you go.
I had this same problem and solved it by setting the AVD Graphics performance from 'automatic' or 'hardware' to 'software' graphics acceleration. You can see the setting here: Android AVD graphics acceleration setting picture
You can read more about that setting here: Configure Hardware Acceleration for the Android Emulator
I believe this has something to do with Nvidia drivers and the android emulator, as I only got the problem on the display using a Nvidia GPU and not the display using the Intel integrated one... which is disappointing not to be able to take advantage of the better GPU for graphics acceleration.
Thanks to the hint provided by Serjux's answer, I resolved my similar problem - Android emulators freeze immediately when moved from one monitor to another. They worked fine without this problem until I upgraded my PC from Intel i5-3570K to AMD Ryzen 7 2700 while the video card GeForce GTX 1050 remained. I use Hyper-V versions of Android emulators. For hw.gpu.mode, I have tried auto, host, angle, mesa, and found only mesa works fine:
In my case moving the AVD window very slowly, does the trick.
Serjux's answer works but apparently at the cost of performance. I should mention that moving it to my primary monitor at speed doesn't cause a crash, but moving it quickly to the second one does.
For me what worked was changing the
gpu.mode from config.ini located in users/youruser/.android/avd/emulator-name/config.ini to gpu.mode=host
The problem appears also with a i7-6700k, GTX 1080 and miscellaneous AVDs in my environment.
It works without a problem when Nvidia Surround is enabled.
But this might not be a solution which everyone prefers.
I had the same problem, but the 2018's answer does not helped to me.
I found another solution and share here, maybe it can help other peoples.
I just changed the GPU Mode to "Software". In my case it was not possible from the AVD settings, so I did it manually.
In my case the phone is Pixel 4 so the config.ini file is located here: C:\Users\myuser.android\avd\Pixel_4_API_30.avd\config.ini
I replaced hw.gpu.mode = auto by hw.gpu.mode = software

Android Virtual Devices (AVD) resolution not correct after downloading Android 5.1.1 for SDK

The story is that I developed an Android program with Android 4.4.2. But some problems was found after installing the program to a device with Android 5.1.1. So I tried to download Android 5.1.1 for my SDK to debug the problem. Then the AVD I kept on using becomes like a mess no matter I changed to different configuration (see picture 1). My AVD configuration is as picture 2.
Hope someone could help... Thank you so much!
Picture 1
Picture 2
Got a temporary way to solve it and don't know if it is correct.
Set the skin to "no skin".
There is another problem happened now. The control bar of that window shows out of the screen. It makes the window cannot be moved. Anyway, I can continue my development job in this way...

AVD cannot be created Ok is disabled

I have eclipse juno 4.2.1 Android SDK already installed, I've created an Android application and while creating new AVD
the Ok button is always disabled although I've determined all it's specifications
here is the specifications I've entered
I don't know why
Any ideas!
Thanks.
No system Images You installed,
Go to window->Android SDK Manager, and download System images for avd for that specific target
You can check if you have any spaces in the "AVD Name".
just restart eclipse.Although you download it still needs a restart.
Look at the CPU/ABI section on your screenshot. It is clearly saying that there is no system image installed for the targeted version.
Go to SDK Manager and install 'ARM EABI v7a System Image' for your target version.
Hope it helps!
After I follow to above solution what I download the system image, but the disable of OK button cannot be reactivated by system image. I tried to refine the parameter setting that RAM is less than 758M bytes (less than hardware configuration) for HTC One X. There is alright to reactivate the "OK" button.
The program of SDK Manager is required to check the available RAM in your machine whether for the testing in simulation of SDK Manager. I tried to use less RAM size in ADV virtual device and then system can enable "OK" button instantly.
I just had to select a skin from the drop-down menu to enable the ok button.
Possible alternative solution
I banged my head on this for several hours until I found out that the default location was C:\username path\SDKs or something, where Android was installed on my system to D:\sdks\android_sdk_windows. So, changing the Eclipse Android directory to D:\sdks\android_sdk_windows fixed it.
I also heard that it may help things if you install the Android SDK to a path without spaces.
Hope this helps someone keep some hair.

Categories

Resources