Ubuntu 14.04 64位安裝calabash-android問題彙總

初裝Ubuntu 14.04 64位後,安裝calabash-android步驟:

安裝jdk+ant

  1. sudo apt-get update
  2. sudo apt-get install openjdk-7-jre-headless
  3. sudo apt-get install openjdk-7-jdk
  4. sudo apt-get install ant
  5. sudo apt-get intall make

安裝openjdk-7-jdk以前,運行ant失敗:java

Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar

安裝make以前,運行sudo gem install calabash-android -V失敗:linux

ERROR:  Error installing calabash-android:
	ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lc... yes
creating Makefile

make
sh: 1: make: not found

安裝Android SDK

  1. sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6
  2. 下載adt-bundle並解壓

http://www.androiddevtools.cn/ 下載Linux 64位adt-bundle-linux-x86_64-20140702.zip,並解壓到home目錄,
~/.bashrc中設置:android

export ANDROID_HOME=$HOME/adt-bundle-linux-x86_64-20140702/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH

安裝 lib32z1 lib32ncurses5 lib32stdc++6 以前, 打開ADT報找不到文件錯誤:c++

Cannot run program "/home/test/adt-bundle-linux-x86_64-20140702/sdk/platform-tools/adb": error=2, No such file or directory' while attempting to get adb version from '/home/test/adt-bundle-linux-x86_64-20140702/sdk/platform-tools/adb'    

~/adt-bundle-linux-x86_64-20140702/sdk/tools$ ./adb
bash: ./adb: No such file or directory

~/adt-bundle-linux-x86_64-20140702/sdk/platform-tools$ ls adb -l
-rwxrwxrwx 1 ubuntu ubuntu 1355536  6月 21 18:09 adb

安裝ruby+ruby1.9.1-dev+calabash-android

  1. sudo apt-get install ruby
  2. sudo apt-get install ruby1.9.1-dev
  3. 安裝 calabash-android

設置淘寶源後再安裝:ubuntu

sudo gem sources --remove http://rubygems.org/  
sudo gem sources -a http://ruby.taobao.org/  
sudo gem install calabash-android -V

安裝ruby1.9.1-dev以前,試圖安裝calabash-android,將報錯:ruby

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
相關文章
相關標籤/搜索