简体   繁体   中英

Android Emulator Screen Size not the same as device frame

When I run the emulator the screen size is smaller than the device frame as in the image below. It only happens in a computer with a screen resolution of 3840 x 2160Android 模拟器屏幕

THis will work for sure

You can fix the scaling issue when using the Hardware rendering by simply making windows override the scaling setting. How?, it's very easy. Simply locate the .exe file for the emulator that you are using, (eg "qemu-system-armel.exe" for ARM and "qemu-system-x86_64.exe" for x86). To make sure which .exe file, just run the emulator then use task manager to locate the .exe file is running, see the screenshot. locate the .exe file using task manager

In my case it was in this location: "C:\\Users[Username]\\AppData\\Local\\Android\\Sdk\\emulator\\qemu\\windows-x86_64\\qemu-system-x86_64.exe"

.exe 文件任务管理器的屏幕截图

Now just right click on the file then click on properties then choose the "Compatibility" tab. Under "Settings" at the bottom, click on "Change high DPI settings". A new window will open. Tick the last checkbox "Override high DPI scaling behavior." under "High DPI scaling override". Then select from the drop down below it "System" (this is very important or it will not make any difference!), see the screenshot below. Now just hit OK and OK. Restart Android Studio and that's it, problem solved :)

结果!!

I have a Dell XPS 13 with a screen resolution of 3200 x 1800 and I had exactly the same problem.

After playing with the settings I found a (temporary) solution in Android Studio:

Navigate to Tools -> Android -> AVD Manager

  1. Click on "edit this AVD"(the one with the pencil drawing)
  2. In the "Emulated Performance" click the "Software.." option (Image below)

This way the rendering is made from software and not from the graphics card. It definitely effects the performance but maybe for a test it's ok.

Alternative suggestion: I tested the emulator from Genymotion and it works. It is free for personal users and maybe a good option if you want something faster.

在此处输入图片说明

I was able to fix this problem by on a Surface Pro by going to the display settings (right-click on desktop and select Display Settings) and changing the scale from 150% to 100%.

Scale setting:

在此处输入图片说明

This setting made all windows and text to small for me to see without a magnifying glass, so I changed it back to 150% and the problem did not reappear.

If the above Emulated performance is grayed out , which it was for me so the above answer did not help.

Not the most efficient way but you can change your screen resolution down to (1920x1080) and scale factor to 100% and it runs fine. You may have to restart your computer.

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