一、
意思是5037端口被其它应用占用了,找到该端口对应的应用,步骤如下:
1.打开cmd.
2.输入netstat -aon|findstr “5037”,如下图
3.输入tasklist|findstr“10056”,如下图
4.在任务管理器中干掉该应用,重启AndroidStudio即可
二、模拟器RAM过大
D:\Android\sdk\tools\emulator.exe -avdNexus_5_API_23_x86 -netspeed full -netdelay none
emulator: WARNING: Requested RAM size of1536MB is too large for your environment, and is reduced to1152MB.
emulator: device fd:596
HAXM is not working and emulator runs inemulation mode
emulator: The memory needed by thisAVD exceeds the max specified in your HAXM configuration.
emulator: AVD RAM size = 1152 MB
emulator: HAXM max RAM size = 1024 MB
emulator: You might want to adjust your AVDRAM size and/or HAXM configuration to run in fast virt mode.
Cannot set up guest memory 'pc.ram': Invalidargument
Error accepting connection, aborting
或者
D:\Android\sdk\tools\emulator.exe -avdNexus_5_API_23_x86 -netspeed full -netdelay none
emulator: device fd:584
HAXM is working and emulator runs in fastvirt mode
Cannot set up guest memory 'pc.ram': Invalidargument
Error accepting connection, aborting
最后将模拟器的RAM改为512
再次运行AVD,此时AVD能够正常运行起来了。至此,Android开发环境算是搭建起来了,可是速度和蜗牛一样。
三、未安装Intel HAXM
D:\Android\sdk\tools\emulator.exe -avd Nexus_5_API_23_x86 -netspeed full -netdelay none
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
异常的原因是Please ensure Intel HAXM is properly installed and usable.说明要安装Intel HAXM,于是搜罗了一番,发现Androidsdk已经自带了Intel HAXM。于是找到sdk\extras\intel\Hardware_Accelerated_Execution_Manager目录下的intelhaxm-android.exe安装。
但是安装的时候却又出现了以下的问题。
于是网上搜罗了一番,再看看错误。说是Virtualization 没有开启,网上也有出现类似的情况,例如:http://www.cnblogs.com/csulennon/p/4178404.html这篇博客说的就是这个问题。于是重启电脑,设置Virtualization为enable。
重启后可正常安装。安装后继续运行Android模拟器,却出现了另外一个异常。