Windows 10 + Android Studio 2.1 + HelloWorld程序windows安装android studio
首先官网下载Android Studio最新版,地址是http:///sdk/index.html ,如下图:
点击下载,先不要安装。
打开你的任务管理器,看你的“虚拟化”是否是开启状态?
如果是关闭状态,需要读者自己重启电脑进入BIOS开启。见下图:
现在你可以安装了。
为什么要开启虚拟化呢?因为没开虚拟化的话,intel的haxm就没法安装,并且android studio会在安装时报如下的错:
好了,android studio安装好后(打开软件后,其实它还要求你下载一些东西,照做就行,时间较长),打开进入界面,我们来新建一个helloworld工程。
点击运行,就是上图的绿色三角形,你可能遇到:
这是因为你没有模拟器,自己创建一个即可,如果你有的话,点击运行即可(说明一下,对于有模拟器的朋友,运行的时候可能会很卡,打开任务管理器,发现内存占用竟然逼近2000M,这可能是你的模拟器分辨率(resolution)过高了。这就需要我们新建一个低点的分辨率模拟器(或者自己真机跑吧),看下面:)
那我们就新建一个模拟器,菜单栏【Tools】--【Androld】--【AVD Manger】
然后就一直next,next,直到finish。
好了,这就创建完成了。
再点击运行,你可能还会遇到其他问题,这里我就我遇到的问题,说下解决办法。
问题1:adb.exe问题
这个问题的话,你直接吧问题输入百度即可,这个问题很好解决,端口占用,按照百度给的解决即可。
问题2:大概报错是: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!
这个问题希望读者读下这个帖,英文的:https://teamtreehouse.com/community/cannot-launch-avd-in-emulator-on-windows-error-x86-emulation-currently-requires-hardware-acceleration
其中第三位网友的回答和我的情况一样,在Android SDK Manger安装不起作用,只能去官网,引用下这位网友的回答:
I had this same exact issue on my computer, running Windows 8.1.
While I chose to install the appropriate module in the Android SDK Manager, it still didn't solve my issue. Through some research, I found that you install the driver directly through Intel's website:https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
This solved my issue, so I hope it brings you some luck. I read that this was an issue where possible anti-virus software was blocking the installer from Android SDK Manager. I currently use Avast as my anti-virus software.
读者进入官网链接下载安装即可(可能需要重启下android studio)
How to Uninstall (or Reinstall) Windows 10’s Ubuntu Bash Shellplease uninstall and reinstall the
worldpress服务器硬件配置 new world 服务器
云服务器 nodejs hello world 云服务器ecs入门
Windows10 安装APPX程序 PowerShell方式powershell安装appx
windows 10下无法运行msi安装程序win10无法打开msi安装程序包
PotatoFieldImageToolkit: Effortless Potato Crop Monitoring for Higher Yields and Reduced Pests