0.安裝
可以在10分鐘內(nèi)解決
安裝的順序辜窑,VirtualBox
钩述,Genymotion
,Android Studio
穆碎。
VirtualBox
的安裝切距,sudo apt-get install virtualbox
Genymotion
的安裝,下載https://www.genymotion.com/fun-zone惨远,chmod +x
谜悟,運(yùn)行bin
文件话肖,調(diào)用./genymotion
Android Studio
的安裝,下載zip葡幸,解壓最筒,進(jìn)bin
目錄,執(zhí)行./studio.sh
蔚叨,然后安裝Genymotion
插件床蜘。
To install the Genymotion plugin for Android Studio
In Android Studio, go to File/Settings (for Windows and Linux) or to Android Studio/Preferences (for Mac OS X)
Select Plugins and click Browse Repositories.
Right-click on Genymotion and click Download and install. To see Genymotion plugin icon, display the toolbar by clicking >View > Toolbar.
source: https://www.genymotion.com/plugins/
1.配置
在Genymotion
中添加模擬器,如果運(yùn)行過程中出現(xiàn)
當(dāng)然,我們也可以不用
Intel VT
搀别,方法是丹擎,在Virtualbox
中把模擬器的CPU
數(shù)改成1
,單核運(yùn)行歇父,把內(nèi)存改成1024MB
蒂培,在Setting
-System
-Acceleration
中把Enable VT-x
給勾去“裆唬可以想象护戳,模擬器將會非常慢。所以為了打造流暢的模擬器垂睬,需要重啟我們的實體計算機(jī)(不是模擬器)媳荒,在
BIOS
中將Intel Visualization Technology
給enable
。不用修改
Setting
就完成了驹饺。
Virtualbox
的Setting
-Network
-Adapter1
-Promiscuous Mode
中將下拉框從Deny
選到Allow VMS
。
VirtualBox
是不是打開了Setting
逻淌,如果是么伯,退出Setting
就好了疟暖。否則卡儒,其實它也會是問題1的CPU
提示錯誤的連帶報錯,解決方法如配置問題1俐巴。
2.未解決問題
一些app會在Genymotion
中出現(xiàn)明明版本兼容卻提示不兼容而出現(xiàn)不能安裝的問題骨望。比如說微信。一種可能是需要arm translator
欣舵,需要對應(yīng)google play
的gapps
擎鸠,還有一種可能是微信做了反模擬器檢測。我并不知也沒深入研究缘圈。但是解決方法很簡單劣光,下載 Genymotion-ARM-Translation_v1.1.zip 拖拽到模擬器里再執(zhí)行重啟就可以了袜蚕。包括對應(yīng)版本地gapps
,都是flashable的绢涡。
3.測試
Android Studio
越來越好用牲剃,沒什么可以抱怨的,下載demo sample
雄可,
和Eclipse
中Genymotion
的插件不一樣的是凿傅,沒有辦法從Android Studio
中啟動Genymotion
,run“app”
前我們必須手動運(yùn)行打開Genymotion
并運(yùn)行好模擬器数苫。
完成了聪舒,開始寫你的安卓程序吧。