简体   繁体   English

哪个Android Studio AVD可以模拟特定手机

[英]Which Android Studio AVD to emulate a particular phone

I've create a simple app that works well on my HTC One. 我已经创建了一个简单的应用程序,可以在我的HTC One上正常运行。 On my friends Sony Xperia Z3 Compact with a 4.6" HD (1280x720 pixels) screen, however, the layout get pretty messy. I'd like to emulate his screen on my Android Studio AVD, but haven't really found a device configuration that I think will be close. How do you guys suggest I go about deciding which device is the closes one? Being a HD screen I'm thinking I maybe should go for an xxhdpi density screen, which excludes all but the Nexus 5, but I'm not sure if this is the right approach for determining the emulator screen size. 但是,在我的朋友们的索尼Xperia Z3 Compact带有4.6英寸高清(1280x720像素)屏幕上,布局非常混乱。我想在我的Android Studio AVD上模拟他的屏幕,但还没有真正找到能够我想应该接近了,你们如何建议我决定哪个设备是关闭的呢?作为高清屏幕,我想我应该选择xxhdpi密度的屏幕,该屏幕不包括Nexus 5,但所有其他设备我不确定这是否是确定模拟器屏幕尺寸的正确方法。

Kenneth 肯尼斯

So, in the latest stable/beta version of Android Studio, you can create a new AVD, and in the bottom left corner of the dialog, there's a button to "Create Virtual Device". 因此,在最新的稳定版/测试版Android Studio中,您可以创建一个新的AVD,并且在对话框的左下角,有一个“创建虚拟设备”按钮。

This opens a new dialog, on which you can select "New hardware profile". 这将打开一个新对话框,您可以在其中选择“新硬件配置文件”。

Modify the fields to set the screen size as 4.6" and the resolution as 720x1280 (assuming you want portrait phone): 修改字段以将屏幕尺寸设置为4.6“,分辨率设置为720x1280(假设您要使用纵向电话):

在此处输入图片说明

Note the density is displayed as xhdpi . 注意密度显示为xhdpi The density is not something you set: it's a calculated value based on the physical screen size and resolution . 密度不是您要设置的 :它是根据物理屏幕尺寸和分辨率 计算得出的值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM