什么是Genymotion?
Genymotion支持Windows、Linux和Mac OS等操作系統,容易安裝和使用:按簡單的安裝過程,選擇一款Android虛擬設備,開啟后就體驗Genymotion帶來的快感吧。-----引自百度百科
一.下載並安裝genymotion
1.下載genymotion
http://www.genymotion.cn/#theme=download_list 下載列表,必須要先注冊才能使用genymotion.
下載Windows快速安裝包
這個版本包含Oracle VirtualBox 4.2.12支持,因此您不用再手動下載安裝VirtualBox。
其他平台版本
以下版本需要已安裝Oracle VirtualBox(下載頁面),才能啟動虛擬設備。
- Windows 32/64 bitsv2.2.0
- Mac OS X 64 bitsv2.2.0
- Linux 32 bits (Ubuntu, Fedora, Redhat)v2.2.0
- Linux 64 bits (Ubuntu, Fedora, Redhat)v2.2.0
- Linux Debian 64 bitsv2.2.0
下載Eclipse插件
注意:如果要使用此插件,您的系統必須已經安裝Genymotion
2.安裝genymotion
amosli@amosli-pc:~/workspace/genymotion$ ./genymotion-2.2.0_x64.bin amosli@amosli-pc:~/workspace/genymotion$ cd genymotion/ amosli@amosli-pc:~/workspace/genymotion/genymotion$ ./genymotion
如果沒有安裝vitualbox,那么會提示要安裝vitualbox,可以接着安裝vitualbox;已安裝的可以跳過下面的內容.
二.下載.安裝vitualbox
1.下載vitualbox
https://www.virtualbox.org/wiki/Linux_Downloads
VirtualBox 4.3.10 for Linux
Note: The package architecture has to match the Linux kernel architecture, that is, if you are running a 64-bit kernel, install the appropriate AMD64 package (it does not matter if you have an Intel or an AMD CPU). Mixed installations (e.g. Debian/Lenny ships an AMD64 kernel with 32-bit packages) are not supported. To install VirtualBox anyway you need to setup a 64-bit chroot environment.
Please choose the appropriate package for your Linux distribution:
- Ubuntu 13.04 ("Raring Ringtail") / 13.10 ("Saucy Salamander") / 14.04 ("Trusty Tahr") i386 | AMD64
- Ubuntu 12.10 ("Quantal Quetzal") i386 | AMD64
- Ubuntu 12.04 LTS ("Precise Pangolin") i386 | AMD64
- Ubuntu 10.04 LTS ("Lucid Lynx") i386 | AMD64
- Debian 7.0 ("Wheezy") i386 | AMD64
- Debian 6.0 ("Squeeze") i386 | AMD64
- openSUSE 12.3 / 13.1 i386 | AMD64
- openSUSE 11.4 / 12.1 / 12.2 i386 | AMD64
- SUSE Linux Enterprise Server 11 (SLES11) i386 | AMD64
- SUSE Linux Enterprise Server 10 (SLES10) i386 | AMD64
- Fedora 18 ("Spherical Cow") / 19 ("Schrödingers Cat") i386 | AMD64
- Fedora 17 ("Beefy Miracle") i386 | AMD64
- Mandriva 2011.0 i386 | AMD64
- Oracle Linux 6 ("OL6") / Red Hat Enterprise Linux 6 ("RHEL6") / CentOS 6 i386 | AMD64
- Oracle Linux 5 ("OL5") / Red Hat Enterprise Linux 5 ("RHEL5") / CentOS 5 i386 | AMD64
- All distributions i386 | AMD64
這里我選擇的是ubuntu 12.04 amd64 位的.下載速度挺慢的,
也可以從sourceforge上面下載(http://sourceforge.jp/projects/sfnet_virtualbox.mirror/releases/),速度稍微快一點點,其實也差不多.
也可以從新浪上面下載(http://down.tech.sina.com.cn/page/35863.html),速度要更快!推薦!但可能不一定是最新的.
2.安裝vitualbox
方法一:如果是deb格式的數據可以直接雙擊安裝.
同時要加入一下其密鑰:http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
amosli@amosli-pc:~/Desktop$ sudo apt-key add oracle_vbox.asc [sudo] password for amosli: OK
Ubuntu的/ Debian的用戶可能要安裝DKMS軟件包,以確保VirtualBox主機的內核模塊( vboxdrv , vboxnetflt和vboxnetadp )得到正確更新,可以執行下面的命令進行安裝:
amosli@amosli-pc:~$ sudo apt-get install dkms
方法二:
(1)、打開終端(即 terminal,快捷鍵為 Ctrl+Alt+T),輸入以下代碼:
- sudo gedit /etc/apt/sources.list
回車,然后輸入電腦賬戶密碼,再回車。在彈出的 gedit 編輯器窗口 sources.list 文件的末尾處加入軟件源,要添加的內容如下:
- deb http://download.virtualbox.org/virtualbox/debian precise contrib
(2)、再在終端內輸入如下代碼以導入公鑰:
- wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
回車,等待(視網絡狀況而定)。
(3)、等終端內容跳動,等待輸入時,輸入以下代碼以更新源(一定要更新源,不然即使安裝了 VirtualBox 也無法使用):
- sudo apt-get update
(4).輸入以下命令進行聯網安裝
sudo apt-get install virtualbox-4.3
或者輸入以下命令:
sudo dpkg --install virtualbox-4.3_4.3.12-93733~Ubuntu~precise_amd64.deb
三.啟動genymotion
安裝完vitualbox后,再次重新啟動genymotion
四.可能出現的問題
1.如下圖所示:(圖片借用)
2.如下所示:
Unable to start the Genymotion virtual device.
The VirtualBox software returned an error: "incompatible state".
Please, run the VirtualBox software to check for issues. Then, try to run the Genymotion virtual device directly from VirtualBox to have a possible explanation.
For more information refer to: https://cloud.genymotion.com/page/faq/#vbox
這里我的解決方案是:先卸載掉virtualbox,然后換一個版本的virtualbox就好了.
卸載命令為:
#全局卸載,推薦使用 sudo apt-get purge virtualbox\* #或者直接卸載,但可能刪除不干凈 sudo apt-get remove virtualbox-\*
如果提示virtualbox正在運行可以使用kill命令干掉它.
#查詢pid ps -ef | grep virtualbox #干掉virtualbox kill -9 pid
這樣再重新下載安裝一下就可以了.
也可以借鑒:http://stackoverflow.com/questions/20662867/genymotion-does-not-start-android-virtual-device