eclipse Android 模拟器 AVD 窗口大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5349817/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android-emulator AVD Window Size
提问by sara
My question seems to be stupid, but I really could not solve it.
我的问题似乎很愚蠢,但我真的无法解决。
I am using eclipse to develop android applications, but when I run the emulator AVD it has a fixed window size (very huge on my computer screen), so I can't see the rest of the Android screen.
我正在使用 eclipse 开发 android 应用程序,但是当我运行模拟器 AVD 时,它有一个固定的窗口大小(在我的电脑屏幕上非常大),所以我看不到 Android 屏幕的其余部分。
Can you help me?
你能帮助我吗?
回答by Anne
If the size of the emulator is too big. You can resize it by:
如果模拟器的尺寸太大。您可以通过以下方式调整其大小:
- Run > Run Configurations
- Pick the "Target" tab
- Scroll down to Additional Emulator Command Line Options and put in:
-scale 0.8
or another number
- 运行 > 运行配置
- 选择“目标”选项卡
- 向下滚动到 Additional Emulator Command Line Options 并输入:
-scale 0.8
或其他数字
回答by C??ng L?k
Here can help you:
这里可以帮到你:
- Menu -> Windows -> Android SDK and AVD manager
- Choose your AVD then select Editbutton
- In line Skinyou choose HVGAfor built-in or custom your size resolution...
- 菜单 -> Windows -> Android SDK 和 AVD 管理器
- 选择您的 AVD,然后选择Edit按钮
- 在线皮肤,您可以选择HVGA用于内置或自定义您的尺寸分辨率...
HVGA will allow the emulator to fit on your screen.
HVGA 将允许模拟器适合您的屏幕。
回答by kogorou
type this command
输入这个命令
adb emu window scale 0.6
回答by araneae
Here's what worked for me:
以下是对我有用的内容:
- In eclipse, go Run -> Run configurations.
- Select the Target tab.
- In the
Additional Emulator Command Line Options
field type-skin --320x480
or some other resolution appropriate for you. - Click "Apply" button.
- Click the "Run" button.
- 在 Eclipse 中,运行 -> 运行配置。
- 选择目标选项卡。
- 在
Additional Emulator Command Line Options
字段类型-skin --320x480
或其他适合您的分辨率中。 - 单击“应用”按钮。
- 单击“运行”按钮。
I tried the -scale 0.8
option but it didn't work well because although the screen size was reduced, the color looked like 8 bit color... or worse. It was entirely unusable since the flash screen was almost entirely white.
我尝试了该-scale 0.8
选项,但效果不佳,因为虽然屏幕尺寸缩小了,但颜色看起来像 8 位色……或更糟。它完全无法使用,因为闪光灯屏幕几乎完全是白色的。
The -skin --320x480
option produced an emulator of an appropriate size with no graphics issues.
该-skin --320x480
选项生成了一个适当大小的模拟器,没有图形问题。
回答by Anand Phadke
This is simplest one
这是最简单的
- Go to
Run
- Open command prompt
- Type:
telnet localhost 5554 or telent localhost EMULATORID
- Then you will get Android console
- Type this command
window scale 0.7
orwindow scale <value from 0 to 1>
.
- 去
Run
- 打开命令提示符
- 类型:
telnet localhost 5554 or telent localhost EMULATORID
- 然后你会得到Android控制台
- 键入此命令
window scale 0.7
或window scale <value from 0 to 1>
.
And if you are using Windows 7 then you have to first activate your telnet client. for this follow these steps:
如果您使用的是 Windows 7,那么您必须首先激活您的 telnet 客户端。为此,请执行以下步骤:
- Go to control panel
- There is icon named
Programs
below thatUninstall program
is there click on it. - Then click on the turn Windows features on or off at left most to your screen
- One list will be pop up just tick on the telnet client
- And then click on OK
- For testing go to command prompt and type
telnet
if you will not get error then telnet is working
- 进入控制面板
- 有
Programs
下面命名的图标,Uninstall program
点击它。 - 然后单击屏幕最左侧的打开或关闭 Windows 功能
- 只需在 telnet 客户端上打勾就会弹出一个列表
- 然后点击 OK
- 要进行测试,请转到命令提示符并键入
telnet
如果您不会收到错误,则 telnet 正在工作
回答by user3450545
Go to Android AVD managerand chose the device.
Click
start >> Launch options >>> Scale display to real size >> screen size >> 6
转到Android AVD 管理器并选择设备。
点击
start >> Launch options >>> Scale display to real size >> screen size >> 6
回答by Jim
This will do exactly what you would like to do, which is leave the emulator screen resolution alone while allowing you to scale the emulator window.
这将完全符合您的意愿,即在允许您缩放仿真器窗口的同时保留仿真器屏幕分辨率。
- Select the menu item
Window/Android SDK and AVD Manager/Start
- Check
Scale display to real size
, (you can then set the screen sizein inches on this page) - Click
Launch
. - The skin size the way you want it will appear, no app will be running. Wait for the launch to complete. Eclipse and Windows might not be not happy if you try to start your app during the skin launch.
- Start your app (with F11for instance).
- You may get a dialog about attaching to a running emulator. Do so.
- 选择菜单项
Window/Android SDK and AVD Manager/Start
- 检查
Scale display to real size
,(然后您可以在此页面上以英寸为单位设置屏幕大小) - 单击
Launch
。 - 皮肤大小会以您想要的方式显示,不会运行任何应用程序。等待启动完成。如果您尝试在皮肤启动期间启动应用程序,Eclipse 和 Windows 可能会不高兴。
- 启动您的应用程序(F11例如)。
- 您可能会收到一个关于附加到正在运行的模拟器的对话框。这样做。
回答by Kurt Wagner
For Android Studio (0.6.1 at time of writing):
对于 Android Studio(撰写本文时为 0.6.1):
- Click Run>Edit Configurations
- Select module you want to alter under 'Android Application' expandable list on left
- Click 'Emulator tab
- Make sure 'Additional command line options' is selected and type: -scale 0.5
- Hit 'OK' and run your app!
- 单击运行>编辑配置
- 在左侧的“Android 应用程序”可扩展列表下选择要更改的模块
- 单击“模拟器”选项卡
- 确保选择“其他命令行选项”并键入:-scale 0.5
- 点击“确定”并运行您的应用程序!
回答by yxk
A simple solution with Android Studio is: - launch the adv manager - Select the emulator line you want - hit the edit button on the right (a pencil) - In the middle of the configuration screen that opens there is a Scale radio field - choose the ratio between device and screen that you prefer. I have chosen "4dp on device = 1px on screen" and the resulting size is just what I wanted (using Nexus 5). - Hit Finish
Android Studio 的一个简单解决方案是: - 启动广告管理器 - 选择您想要的模拟器行 - 点击右侧的编辑按钮(铅笔) - 在打开的配置屏幕中间有一个 Scale 单选框 - 选择您喜欢的设备和屏幕之间的比例。我选择了“设备上的 4dp = 屏幕上的 1px”,结果大小正是我想要的(使用 Nexus 5)。- 击中完成
回答by David Hackro
in linux is easy How do I launch the Android emulator from the command line?
在 linux 中很容易 如何从命令行启动 Android 模拟器?
you need to add at the end this "-scale 0.45"
for example: /home/hackro/Documentos/Software/adt-bundle-linux-x86_64-20140702/sdk/tools/emulator64-x86 -avd Android5.1.1 -scale 0.45
您需要在最后添加此“-scale 0.45”,例如: /home/hackro/Documentos/Software/adt-bundle-linux-x86_64-20140702/sdk/tools/emulator64-x86 -avd Android5.1.1 -scale 0.45
I have shortcuts in my menu of the linux and they work well
我的 linux 菜单中有快捷方式,它们运行良好