1,安装jdk,
去甲骨文网站下载jdk1.7.0_71.tar.gz
展开到/opt目录下
2,安装git-core
sudo apt-get install git-core
3,安装maven
下载链接:http://maven.apache.org/download.cgi
下载apache-maven-3.3.1-bin.tar.gz
展开到/usr/local下
4,配置路径
修改/etc/profile文件(sudo gedit /etc/profile),添加
JAVA_HOME=/opt/jdk1.7.0_71
export JAVA_HOME
ANDROID_JAVA_HOME=/opt/jdk1.7.0_71
export ANDROID_JAVA_HOME
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
M2_HOME=/usr/local/apache-maven-3.3.1
export MAVEN_OPTS="-Xms256m -Xmx512m"
export M2_HOME
PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH
export PATH
4,修改网址映射
sudo gedit /etc/hosts添加:
173.194.72.82 www.googlesource.com
74.125.23.82 android.googlesource.com
203.208.49.161 cache.pack.google.com
203.208.49.169 dl-ssl.google.com
203.208.49.169 dl.google.com
74.125.23.82 onejar-maven-plugin.googlecode.com
173.194.127.145 www.google.com
74.125.235.193 developer.android.com
199.27.79.209 repo1.maven.org
64.233.189.82 android.googlesource.com
37.61.54.158 commondatastorage.googleapis.com
173.194.127.202 storage.googleapis.com
199.27.79.215 repo.maven.apache.org
5,同步cling core核心代码
git clone https://github.com/4thline/cling.git
6,编译
进入同步下来的cling目录,执行mvn clean install,编译完成就OK。