Android 模拟器中的字体较小

发布于 2024-10-31 13:59:12 字数 150 浏览 1 评论 0原文

有时我注意到 Android 模拟器以非常小的字体开始。这似乎是随机发生的。其他时候它有正常的字体大小。 我使用ADT 10.0.1。 你知道问题出在哪里吗?

小字体

Sometimes I notice the Android emulator starts with a very small font size. This seems to happen randomly. Other times it has a normal font size.
I use ADT 10.0.1.
Do you know what is the problem?

Small font Normal font

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

很酷又爱笑 2024-11-07 13:59:12

这种情况经常发生,虽然我不确定这背后的确切原因,但似乎在某种程度上检测到了错误的密度,并且较低 dpi 的资源被加载到较高 dpi 模拟器中。这就是为什么所有东西都变小了,但布局工作正常并且在自己的位置对齐。你是对的:当发生这种情况时,网络在模拟器中不起作用!这两件事似乎无关,但我的猜测是模拟器无法成功加载当前虚拟机的配置,其中包括密度和网络功能。

无论如何,似乎没有任何关于此的官方信息,并且 类似android-developers 邮件列表中的报告没有得到 Android 开发者的任何回复,尽管这是一个非常流行的错误。

现在的解决办法只有重新启动模拟器。有时你必须多次这样做,但最终它起作用了。

This happens very often, and although I'm not sure about the exact reason behind this, it seems that somehow the wrong density was detected for this and resources for a lower dpi is loaded inside a higher dpi emulator. That's why everything is smaller, but the layout works properly and aligns things at their own places. And you're right: when this happens, network doesn't work in emulator! These two things seem unrelated, but my guess is that emulator fails at loading config for the current virtual machine successfully, and that includes density and network capabilities.

Anyways, there doesn't seem to be any official info on this, and similar reports in android-developers mailing list didn't get any response for developers of Android, although this is a very popular bug.

And the solution right now is only restarting the emulator. Sometimes you have to do this more than once, but finally it works.

海拔太高太耀眼 2024-11-07 13:59:12

确保您的计算机的显示分辨率可以满足模拟器的精确分辨率。如果您使用配备 Retina 显示屏的 Mac,则可能会出现此问题。尝试通过显示设置更改显示分辨率。

Make sure your computer's display resolution can satisfy your emulator's exact resolution. If you are using Mac with Retina Display, this problem may occur. Try changing display resolution via Display settings.

极度宠爱 2024-11-07 13:59:12

当我断开显示器连接或通过 RDP 登录电脑时,模拟设备的分辨率会发生变化。文字和图标都非常小。有时只需重新启动模拟就足够了,现在我必须转到 Android Studio 中的设置 ->设备管理器 (AVD) 并将当前分辨率加倍。

When I disconnect a display or log in to the PC through RDP, the resolution of the emulated device changes. The text and icons are extremely small. Sometimes just restarting the emulated was enough, now I have to go to settings in Android Studio -> Device Manager (AVD) and double the current resolution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文