问题
I'm having trouble creating a custom AVD for XPeria ZL phone using the Device Definitions tab.
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.
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.
回答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.
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:
In the Android SDK Tools version 21.1, the xxhdpi screen resolution for the emulator display is not yet supported. However, you could do a manual override of the LCD properties of the emulator. This will ensure that the correct resources are being dispatched for the Xperia™ Z emulator. To do so, please execute the following in your command line after the Xperia™ Z emulator has completed the boot sequence:
adb shell setprop qemu.sf.lcd_density 480
adb shell stop
adb shell start
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.
来源:https://stackoverflow.com/questions/14365056/issues-with-avd-manager-v21-0-1-and-21-1rc2-xxhdpi-not-supported