开个模拟器那叫一个慢啊,网上有用VMWare虚拟机加速的,懒得整;
直接用SDK自带的好了
[size=xx-large][color=red]注意:[/color][/size]使用该方法,自己测试的4.1版本结果挺多程序运行不太正常(有时行,有时崩溃,如安卓市场,输入法则干脆一直不行),google自带的还成;网络过一会儿就不能用了,重启模拟器就又可以了;自己写的最基本程序没问题
[color=red][size=x-large]官方教程:[/size][/color][url]http://developer.android.com/tools/devices/emulator.html[/url]
只需要看Configuring Virtual Machine Acceleration 和 Configuring VM Acceleration on Windows两节即可
下面来看具体步骤:
[size=x-large][color=blue]1、下载所需的x86镜像及HAXM[/color][/size]
[size=large]打开SDK Manager.exe,按如下两张图下载所需的支持X86 image的Android版本及X86镜像,以及HAXM[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4127/03ebb9f3-db4c-3655-a61f-37c77945029a.png[/img]
[img]http://dl.iteye.com/upload/attachment/0078/4129/ee940f35-97e8-3464-9f9f-2e23adb85249.png[/img]
[size=x-large][color=blue]2、安装HAXM[/color][/size]
[size=large]下载完成后到如下图所示位置安装HAXM,需要CPU支持虚拟化技术,有的可能需要在BIOS中打开,如我的ThinkPad E520 在BIOS 中的Security 下面。[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4131/a2873af2-5c36-3d47-954e-afe4e957bca0.png[/img]
[img]http://dl.iteye.com/upload/attachment/0078/4133/8ecb6217-cfbb-346a-a62a-8e8014a4255f.png[/img]
[size=large][color=red]验证安装:[/color]
命令行里输入sc query intelhaxm
看到状态里有RUNNING即可,如下图所示[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4139/fc7a5ebb-613a-33b3-bded-08b5c080a513.png[/img]
[size=large][color=red]管理HAXM:[/color][/size]
[quote]You can adjust the amount of memory available to the Intel HAXM kernel extension by re-running its installer.
You can stop using the virtualization driver by uninstalling it. Re-run the installer or use the Control Panel to remove the software.[/quote]
[size=x-large][color=blue]3、创建基于X86镜像的模拟器[/color][/size]
[size=large]Eclipse中按下图打开Vitual device manager,创建基于X86镜像的模拟器,启动之后运行自己的工程(不自动运行的要到run configurations中配置一下),选择该模拟器即可[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4164/661904c8-3d6a-35ad-9d04-19570330ccfb.png[/img]
[img]http://dl.iteye.com/upload/attachment/0078/4166/be04c294-69d2-3c23-b696-7a05039e5ecb.png[/img]
直接用SDK自带的好了
[size=xx-large][color=red]注意:[/color][/size]使用该方法,自己测试的4.1版本结果挺多程序运行不太正常(有时行,有时崩溃,如安卓市场,输入法则干脆一直不行),google自带的还成;网络过一会儿就不能用了,重启模拟器就又可以了;自己写的最基本程序没问题
[color=red][size=x-large]官方教程:[/size][/color][url]http://developer.android.com/tools/devices/emulator.html[/url]
只需要看Configuring Virtual Machine Acceleration 和 Configuring VM Acceleration on Windows两节即可
下面来看具体步骤:
[size=x-large][color=blue]1、下载所需的x86镜像及HAXM[/color][/size]
[size=large]打开SDK Manager.exe,按如下两张图下载所需的支持X86 image的Android版本及X86镜像,以及HAXM[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4127/03ebb9f3-db4c-3655-a61f-37c77945029a.png[/img]
[img]http://dl.iteye.com/upload/attachment/0078/4129/ee940f35-97e8-3464-9f9f-2e23adb85249.png[/img]
[size=x-large][color=blue]2、安装HAXM[/color][/size]
[size=large]下载完成后到如下图所示位置安装HAXM,需要CPU支持虚拟化技术,有的可能需要在BIOS中打开,如我的ThinkPad E520 在BIOS 中的Security 下面。[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4131/a2873af2-5c36-3d47-954e-afe4e957bca0.png[/img]
[img]http://dl.iteye.com/upload/attachment/0078/4133/8ecb6217-cfbb-346a-a62a-8e8014a4255f.png[/img]
[size=large][color=red]验证安装:[/color]
命令行里输入sc query intelhaxm
看到状态里有RUNNING即可,如下图所示[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4139/fc7a5ebb-613a-33b3-bded-08b5c080a513.png[/img]
[size=large][color=red]管理HAXM:[/color][/size]
[quote]You can adjust the amount of memory available to the Intel HAXM kernel extension by re-running its installer.
You can stop using the virtualization driver by uninstalling it. Re-run the installer or use the Control Panel to remove the software.[/quote]
[size=x-large][color=blue]3、创建基于X86镜像的模拟器[/color][/size]
[size=large]Eclipse中按下图打开Vitual device manager,创建基于X86镜像的模拟器,启动之后运行自己的工程(不自动运行的要到run configurations中配置一下),选择该模拟器即可[/size]
[img]http://dl.iteye.com/upload/attachment/0078/4164/661904c8-3d6a-35ad-9d04-19570330ccfb.png[/img]
[img]http://dl.iteye.com/upload/attachment/0078/4166/be04c294-69d2-3c23-b696-7a05039e5ecb.png[/img]