如何在 AVD Eclipse 上运行和编译 Android 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20925059/
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
how to run and compile Android Apps on AVD Eclipse
提问by Reza Paidar
please help me... :(
I downloaded Android ADT from google play and update all of it's SDK and etc to last version and also I've installed Java Runtime(SE) last version.
Now according to any basic learning courses, I want to run the first App "Hello World!" in AVD.
For example : from menu I just click "new"and select "Android Application Project".then I just set App Name, project Name and Package Name just as like all trainings and there is no error in here and everythings goes well.
after that I must choose my SDKs and in order to lessons, I was choose combo boxes as bellow :
请帮帮我... :(
我从google play下载了Android ADT并将它的所有SDK等更新到最新版本,并且我已经安装了Java Runtime(SE)最新版本。
现在根据任何基础学习课程,我想要在 AVD 中运行第一个应用程序“Hello World!”。
例如:从菜单中单击“新建”并选择“Android 应用程序项目”。然后我就像所有培训一样设置应用程序名称、项目名称和包名称这里没有错误,一切顺利。
之后我必须选择我的 SDK,为了上课,我选择了如下组合框:
Then I didn't change and left all options to their default. and finally click on Finish button.
now I can see my first program environment but in design mode.
the problems are here :
at last, I want run my first program with AVD as shown in bellow :
然后我没有改变并将所有选项保留为默认值。最后点击完成按钮。
现在我可以看到我的第一个程序环境,但处于设计模式。
问题在这里:
最后,我想用 AVD 运行我的第一个程序,如下所示:
and run AVD.
1st problem : after long time(almost 3 or 6 min) AVD simulate Andriod smart phone.
2nd problem : in menu screen i can't see my first App Icon so I can't Run It.
3rd problem : If I want Run AVD with Intelx86, the emulator Run after horrible long time and say this error:
并运行 AVD。
第一个问题:经过长时间(几乎 3 或 6 分钟)AVD 模拟 Andriod 智能手机。
第二个问题:在菜单屏幕中我看不到我的第一个应用程序图标,所以我无法运行它。第三个问题:如果我想用 Intelx86 运行 AVD,模拟器运行很长时间后会出现这个错误:
Starting emulator for AVD 'AVD_for_AVD_for_test_5_1in_WVGA' emulator: Failed to open the HAX device! HAX is not working and emulator runs in emulation mode emulator: Open HAX device failed
为 AVD 'AVD_for_AVD_for_test_5_1in_WVGA' 模拟器启动模拟器:无法打开 HAX 设备!HAX 不工作,模拟器在仿真模式下运行 模拟器:打开 HAX 设备失败
The Ways I tried to solve my problems我尝试解决问题的方法:
第一个问题:在编辑 AVD 中,我检查snapshot快照并取消选中host GPU主机 GPU
Result结果:第一次跑步需要很长时间,但第一次之后很快。
第二个问题:我真的没有任何想法:(
Result结果:我对 Android 开发程序感到失望。这是非常复杂和耗时的。第三个问题:我什至检查Intel Vitalization我的 System Bios 上的Intel Vitalization并且我确信它可以工作,因为我已经在需要此选项的 VMware 机器上运行 Windows 2008 R2。
Result结果:我仍然有那个问题... AVD 在 Intel x86 模式下不起作用。
最后,我的系统配置是:
操作系统:Window 7 Ultimate with last Updates。
CPU:英特尔酷睿7 2630QM 2.00GHz。
内存:8 GB。
图形:英特尔和 2GB Nvidia。
so please help me. I'm really like to learn Android Programming :((
所以请帮助我。我真的很喜欢学习Android编程:((
现在感谢 Rohan KandwalRohan Kandwal我可以在 Intel X86 模式下非常快地运行模拟器,但我仍然看不到我的应用程序图标

采纳答案by Rohan Kandwal
For the application not present in the menu, I think that you are not running the project from eclipse and just looking into the emulator. Please run the project from the IDE that you are using eg. Eclipse.
对于菜单中不存在的应用程序,我认为您不是从 eclipse 运行该项目而只是查看模拟器。请从您正在使用的 IDE 运行项目,例如。蚀。
If have runthe app and still not seeing it on the emulator then please post the logcat.
如果已经运行了应用程序但仍然没有在模拟器上看到它,那么请发布logcat。
For the problem regarding the HAX, go to the folder
有关 HAX 的问题,请转到文件夹
[Android SDK Root]\extras\intel\Hardware_Accelerated_Execution_Manager
then run IntelHaxm.exe
and install.
然后运行IntelHaxm.exe
并安装。
For running the app, right click on the project > Run as > Android Application
为了运行应用程序, right click on the project > Run as > Android Application