问题描述
我无法使用设备为 XPeria ZL 手机创建自定义AVD定义标签.
I'm having trouble creating a custom AVD for XPeria ZL phone using the Device Definitions tab.
我注意到,如果其中之一使用xxhdpi密度,则AVD管理器将无法解析devices.xml文件.
I noticed the AVD manager is unable to parse devices.xml file if one of them uses the xxhdpi density.
请注意,仿真器不再能够将显示缩放到实际大小.
As a side note, the emulator is no longer able to scale display to real size.
有人遇到这些问题并能够解决吗?我真的需要为我们正在研究的POC模仿该设备.
Has anyone faced these issue and was able to fix it? I really need to emulate that device for a POC we are working on.
推荐答案
对于第一个问题,关于添加xxhdpi设备后的解析错误,请尝试将Android SDK工具更新为21.1,这确实应该可以解决问题.
For the first issue, about the error in parsing after adding xxhdpi devices, try updating the Android SDK Tools to 21.1, this really should solve the problem.
对于第二个问题,使仿真器可以使用xxhdpi资源工作,可以在仿真器启动后通过一些附加的adb命令来完成此操作.摘自developer.sonymobile.com( http://developer.sonymobile.com/knowledge-base/sdks/sony-add-on-sdk/install-the-sony-add-on-sdk/),则可以使用以下语句:
For your second issue, making the emulator work with xxhdpi resources, this can be accomplished with a few additional adb-commands after the emulator has started. Taken from an installation troubleshooting page at developer.sonymobile.com (http://developer.sonymobile.com/knowledge-base/sdks/sony-add-on-sdk/install-the-sony-add-on-sdk/), the following statement is available:
adb shell停止
adb shell stop
adb shell启动
adb shell start
然后,仿真器将重新启动.重新启动后,模拟器应使用正确的屏幕密度和UI缩放比例.如果经常使用这些设置,建议您使用批处理文件或Shell脚本执行这些建议.
The emulator will then restart. After it has rebooted the emulator should use the correct screen density and UI scaling. We recommend you to execute these commends using a batch file or a shell script if you are using these settings often.
这篇关于AVD Manager(v21.0.1和21.1rc2)的问题:不支持xxhdpi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!