简体   繁体   中英

Can't change emulated performance of AVD in Android Studio

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.

AVD配置截图

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. 显示带有硬件图形的 Nexus 5X 设备的 AVD 屏幕

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....

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.

在此处输入图片说明

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

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.

我正在使用 mac os - 在我升级我的操作系统后,我的模拟器停止工作,解决方案之一是将图形设置从硬件更改为软件 - 因为我不能 - 来到这里 ---> 原来是 Android Emulator HAXM在 macOS High Sierra 上出于安全原因被排除在外,请点击此链接: https : //developer.android.com/studio/known-issues#deploy

I faced a similar problem. In my case, the solution was to reinstall the x86 image not from the Recommended list but from the x86 Images list. I don't understand what the bug is, but the images from Recommended and x86 Images for the same API and x86 processor type seem to be different when creating Virtual Device. This allowed me to access the Emulated Performance from the Virtual Device settings interface. It for Win10.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM