【Lesson 1】Linux 下搭建vim + android SDK + jruby (不使用eclipse ) (without eclipse, how to install vim + android sdk + jruby + ruboto )
访问量: 3928
1. install git/rbenv
2. install ruby
3. install rubygem,
4. gem install ruboto
5. (refert to http://developer.android.com/sdk/installing/index.html?pkg=tools)
对于 ubuntu < 13.10 : apt-get install ia32-libs 对于 ubuntu >= 13.10: sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
6. install JDK: $ aptitude install openjdk-7-jdk
(如果上述方法不行的话,就来这里下载:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html ,选取你需要的版本)
安装JDK非常简单(参考:http://www.cnblogs.com/memory4young/p/ubuntu-install-jdk.html) , 只需要解压缩之后,设置 JAVA_HOME 和PATH就可以了。
118 export JAVA_HOME="/workspace/jdk1.7.0_67" 119 export CLASSPATH="$JAVA_HOME/lib:." 120 export PATH="$PATH:$JAVA_HOME/bin"
7. 下载standalone android SDK: (参考: http://developer.android.com/sdk/installing/index.html?pkg=tools ) ,然后解压缩到 /workspace/android-sdk-linux
设置 ~/.bashrc, 增加 ANDROID_HOME, 和PATH, 如下(注意其中增加的 各种变量): export JAVA_HOME="/workspace/jdk1.7.0_67" export CLASSPATH="$JAVA_HOME/lib:." export ANDROID_HOME='/workspace/android-sdk-linux' export PATH="/home/siwei/Downloads/mongodb-linux-x86_64-2.4.9/bin:$PATH" export PATH="$PATH:/workspace/nw:$JAVA_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
8. $ruboto setup 这样你就可以看到各种第三方包是否都准备好了。
siwei@siwei-Lenovo-V470c:/workspace/coding_tools/apache-ant-1.9.4$ ruboto setup /home/siwei/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/pry-0.9.12.6/lib/pry/pry_class.rb:258: warning: Insecure world writable dir /workspace in PATH, mode 040777 Java runtime : Found Java Compiler : Found Apache ANT : Not found Android Package Installer: Found Android Emulator : Found Android SDK Command adb : Found Android SDK Command dx : Found Platform SDK android-15 : Not found !!! Ruboto setup is NOT OK !!! Apache ANT was not found.说明我们还需要安装 ANT( 自动化处理的工具)
9 . 来这里下载: http://mirror.symnds.com/software/Apache//ant/binaries/apache-ant-1.9.4-bin.zip , 然后解压缩, 然后设置 ANT_HOME 这个变量:
123 export ANT_HOME="/workspace/coding_tools/apache-ant-1.9.4" 124 export PATH="$PATH:$ANT_HOME/bin"
10. 然后,$ ruboto setup ,会提示说除了 platform sdk 15 没有找到,其他都齐备了。 没关系。因为sdk-15 对应于 android 4.0.3 ,我们目前(2014-9-21)最新的是sdk 19, 20,我们把已经安装好的 sdk 19.0.1 的路径放到PATH下就可以了(这一步ruboto 会自动提示我们)
export PATH="/workspace/android-sdk-linux/build-tools/19.1.0:$PATH"完整的各种路径是:
export JAVA_HOME="/workspace/jdk1.7.0_67" export ANDROID_HOME='/workspace/android-sdk-linux' export PATH="/home/siwei/Downloads/mongodb-linux-x86_64-2.4.9/bin:$PATH" export PATH="/workspace/nw:$JAVA_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" export CLASSPATH="$JAVA_HOME/lib:." export ANT_HOME="/workspace/coding_tools/apache-ant-1.9.4" export PATH="$ANT_HOME/bin:$PATH" export PATH="/workspace/android-sdk-linux/build-tools/19.1.0:$PATH"
11. 安装JRuby (参考:http://jruby.org/getting-started)
Getting Started with JRuby JRuby is one of the easiest Ruby implementations to set up. Let’s start with the basic instructions: Download JRuby: Visit the download page and grab the binaries for the latest JRuby release. Unpack JRuby: Unpack the file you downloaded. You’ll then have a "jruby-" directory. Run JRuby: The JRuby startup script lives in the "bin" directory. Run "bin/jruby -v" to confirm it. That’s about it! Windows If you’re on Windows, we’ve already prepared several flavors of installers for you. Just pick 32- or 64-bit, and whether to bundle the Java Virtual Machine or not.