Android 模拟器屏幕大小与设备框架不同 [英] Android Emulator Screen Size not the same as device frame

查看:45
本文介绍了Android 模拟器屏幕大小与设备框架不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行模拟器时,屏幕尺寸小于设备框架,如下图所示.它仅发生在屏幕分辨率为 3840 x 2160 的计算机中

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 2160

推荐答案

这肯定会奏效

您可以通过简单地使窗口覆盖缩放设置来解决使用硬件渲染时的缩放问题.怎么做,很简单.只需找到您正在使用的模拟器的 .exe 文件(例如,qemu-system-armel.exe"适用于 ARM,qemu-system-x86_64.exe"适用于 x86).要确定哪个 .exe 文件,只需运行模拟器然后使用任务管理器定位正在运行的 .exe 文件,请参见屏幕截图.使用任务管理器找到 .exe 文件

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, (e.g. "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

就我而言,它位于以下位置:C:\Users[用户名]\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe"

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"

现在只需右键单击该文件,然后单击属性,然后选择兼容性".标签.在设置"下在底部,单击更改高 DPI 设置".将打开一个新窗口.勾选最后一个复选框覆盖高 DPI 缩放行为".在高 DPI 缩放覆盖"下.然后从它下面的下拉菜单中选择系统"(这非常重要,否则不会有任何区别!),请参阅下面的屏幕截图.现在只需点击 OK 和 OK.重新启动 Android Studio,就是这样,问题解决了 :)

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 :)

这篇关于Android 模拟器屏幕大小与设备框架不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆