安裝JAVA SDK
下載地址:<a >http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151-zhs.html</a>
選擇“接受許可協(xié)議”拧簸,然后下載Mac OS X x64的dmg弹惦。
<img src="http://upload-images.jianshu.io/upload_images/1840221-bfb11c901106e457.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "300" alt="" align=center />
下載結(jié)束后雙擊安裝眷蚓。安裝完成可用java -version命令在terminal查看
<img src="http://upload-images.jianshu.io/upload_images/1840221-45aa636e0d8a65c6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "400" alt="" align=center />
表示已安裝完成。
但是Mac 10.11的系統(tǒng)上腐泻,可能還會(huì)提示你需要安裝java se 6。這時(shí)你只需要修改一下/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Info.plist文件
<key>JVMCapabilities</key>
<array>
<string>JNI</string>
<string>BundledApp</string>
<string>WebStart</string>
<string>Applets</string>
<string>CommandLine</string>
</array>
修改JVMCapabilities,重啟即可几缭。
安裝IntelliJ IDEA
下載地址:<a >https://www.jetbrains.com/idea/download/</a>
下載android SDK
下載地址:<a >http://developer.android.com/sdk/index.html</a>
如下圖配置進(jìn)入configure配置sdk
<img src="http://upload-images.jianshu.io/upload_images/1840221-a2fe73287c6b4add.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "300" alt="" align=center />
在SDKs添加
<img src="http://upload-images.jianshu.io/upload_images/1840221-4eb1e74f21bc518a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "300" alt="" align=center />
安裝Genymotion和VirtualBox
genymotion和virtualbox安裝后,選擇device下載沃呢,點(diǎn)擊start開(kāi)啟模擬器年栓。
<img src="http://upload-images.jianshu.io/upload_images/1840221-5e8955e1083ebe38.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "300" alt="" align=center />
Genymotion插件
下載地址
<a >https://www.jetbrains.com/idea/download/</a>
下載后在啟動(dòng)畫(huà)面選擇plugin進(jìn)入
<img src="http://upload-images.jianshu.io/upload_images/1840221-552d27b7ef54bddf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "300" alt="" align=center />
點(diǎn)擊install plugin from disk安裝
<img src="http://upload-images.jianshu.io/upload_images/1840221-cbb405321036b059.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "300" alt="" align=center />
安裝后會(huì)在ide里面看到一個(gè)紅色的按鈕,就是genymotion插件薄霜,選擇后點(diǎn)start即可開(kāi)啟某抓。
<img src="http://upload-images.jianshu.io/upload_images/1840221-c95e5f0387bca955.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" width = "300" alt="" align=center />
創(chuàng)建一個(gè)工程
create一直點(diǎn)下去就可以了~ 然后就到MainActivity.java編輯你的代碼吧!