Appium學習筆記3_Genymotion模擬器安裝

tao先生發表於2015-09-17

如果你已經配置好了安卓的執行環境,也配置好了自帶的模擬器AVD,而且也launch了你的安卓模擬器,那麼我相信你是不再願意launch安卓模擬器第二次了,因為實在是太卡了(當然如果你電腦的配置夠高,你就可以無視了)。

有沒有什麼解決方法呢?回答是肯定的,比如用你的真機,但是安卓的版本實在是太多,你不可能買到市場上所有流行的機器吧。所以模擬器的使用是必然的, 好在Genymotion的存在,相對AVD模擬器來說Genymotion好的太多了。

 

Genymotion官網:https://www.genymotion.com/#!/

玩了一下這個模擬器,在認識上覺得Genymotion就是依賴於VirtualBox執行的(虛擬機器,相當於現在用的比較流行的就是VMWare WorkStations),可以理解為就是一臺執行在VirtualBox上的虛擬機器。

進入下載頁:https://www.genymotion.com/#!/download

可以選擇下載Genymotion或者選擇下載Genymotion+VirtualBox整合版本:(下載的時候需要註冊一個賬戶,記住這個賬戶,在後面這個賬戶是需要用到的。)

 

根據自己的需要下載對應的版本,前面我也說過了,Genymotion是基於VirtualBox來執行的,所以至始至終你都需要下載VirtualBox,並進行安裝,所以最好還是下載整合版比較方便。

下載完以後,就是安裝,下一步然後繼續下一步,直到安裝成功,中間步驟忽略。

接下來就是啟動genymotion,選擇"Add"新增一個你需要的模擬器,這個時候需要登陸(用之前註冊的賬戶),然後選擇對應的模擬器進行安裝,根據網速而定來決定你的下載速度了。

下載完成以後,進入Setting下面的ADB介面,然後設定你Android SDK的配置路徑。比如我的"E:\Appium\android-sdk-windows\android-sdk-windows",設定完後退出。

接下來你可以執行你剛剛下載的模擬器,你會感覺從AVD自帶模擬器中釋放出來了。這才是體驗。

 

Eclipse安裝Genymotion外掛:

這一步實在是太坑了,在這裡折騰了半天時間。根據官網上的介紹(兩種方法,一種Eclipse自動更新,第二種就是手動下載jar包)。

 

 

第一步始終獲取不到資源,最終放棄採用第二種方法(坑爹的地方出現了,大天朝的網路大家都懂,但是尼瑪官方文件這塊是不是也沒有介紹清楚啊),

根據第二種方法,去下載頁(如下圖所示):https://www.genymotion.com/#!/download 

 

 下載了最新的jar包(com.genymobile.genymotion.ide.eclipse.plugin_1.0.5.201507301435.jar),然後將這個jar檔案放到"E:\eclipse\plugins"該路徑下,接下來就是不停的開啟Eclipse然後關閉Eclipse,結果大家肯定猜到了Genymotion的圖示在Eclipse tool bar上出現不了。反正是各種折騰。

最後發現是少Jar檔案需要放兩個jar檔案到"E:\eclipse\plugins"該路徑下

com.genymobile.genymotion.ide.eclipse.plugin_1.0.4.201503031034.jar

com.genymobile.genymotion.lib_1.0.4.201503031034.jar

第二個關於lib的jar包沒有找到在哪下載的,而且這兩個jar包的版本日期必須是一樣的,放到對應的路徑下,小圖示就出來了。

 

附上兩個jar檔案的下載地址:

com.genymobile.genymotion.ide.eclipse.plugin_1.0.4.201503031034.jar: http://pan.baidu.com/s/1hXhaY

com.genymobile.genymotion.lib_1.0.4.201503031034.jar:http://pan.baidu.com/s/1qWuvU6g

 

小圖示:

 

 

 

模擬器起來以後:

 

 

下面是官網對於外掛安裝的方法介紹:

Installing the plugin

You can install Genymotion plugin for Eclipse in one of the following ways:

  • Update Site method (recommended);
  • Manual method.

Update Site method (recommended)

  • Start Eclipse.
  • Go to Help/Install New Software menu and click Add.
  • Fill in the fields with the following values and click OK.
    • Name: Genymotion
    • Location: http://plugins.genymotion.com/eclipse
  • Expand Genymobile.
  • Click Select all and Next.
  • Click Next.
  • Read and accept the license terms.
  • Click Finish.
    A security warning indicates that the plugin is not signed; click OK.
  • Click Yes to restart Eclipse.

The Genymotion plugin button  is displayed in the toolbar.

Manual method

  • Ensure Eclipse is closed.
  • Download the plugin from the Genymotion download page.
  • Follow the steps corresponding to your operating system:
    • Windows
      If you have administrator rights, put the 
      .jararchive in the Pluginsdirectory of the Eclipse installation folder.
      Without administrator rights, put the 
      .jararchive in the Pluginsdirectory of the Local Settings\Eclipse folder.
    • Mac OS X
      With administrator rights, put the 
      .jararchive in the Plugins directory of the Eclipse installation folder.
    • Linux
      If you have administrator rights, put the 
      .jararchive in the Plugins directory of the Eclipse installation folder.
      Without administrator rights, put the 
      .jararchive in the Plugins directory of the /home/<user>/Eclipse folder.

相關文章