Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ishitcno1/8450785 to your computer and use it in GitHub Desktop.
Save ishitcno1/8450785 to your computer and use it in GitHub Desktop.
meishixing install android environment

#Installation-Linux

###0. 准备 设置环境变量

export M2_HOME=/home/sdk/apache-maven-3.0.5
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH

export ANDROID_HOME=/home/apps/android-studio/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools/
export PATH=$PATH:$ANDROID_HOME/tools/

复制aapt

cp $ANDROID_HOME/build-tools/19.0.1/aapt $ANDROID_HOME/platform-tools/
cp $ANDROID_HOME/build-tools/19.0.1/lib/dx.jar $ANDROID_HOME/platform-tools/

更新sdk

$ANDROID_HOME/tools/android update sdk --no-ui --obsolete --force

###1. 安装maven

###2. 用maven-android-deployer安装需要的插件
如果add-ons目录下缺少addon-google_apis-google-19,可以将19.1复制后改名

git clone https://github.com/mosabua/maven-android-sdk-deployer.git
mvn -Denforcer.skip=true -Dextras.compatibility.v4.groupid=com.google.android -Dextras.compatibility.v4.artifactid=support-v4 -Dextras.compatibility.v4.version.prefix=r install
mvn install

###3. 下载外部依赖的项目

git clone https://github.com/mibang-inc/Android-CityIndexableListView.git
git clone https://github.com/mibang-inc/android-complex-preferences.git
git clone https://github.com/mibang-inc/Android-SlideExpandableListView.git
git clone https://github.com/mibang-inc/android-times-square.git
git clone https://github.com/mibang-inc/Android-ViewPagerIndicator.git
git clone https://github.com/mibang-inc/Android-PullToRefresh.git

###4. 安装下载的项目

cd project
mvn install

###5. clone项目

git clone [email protected]:/home/git/repo/client/travel_android.git

###6. 安装jar包

cd travel_android/libs && bash ./install.sh

###7. 编译运行景点应用

mvn install android:deploy android:run

###8.FAQ

Failure to find android.support:compatibility-v7-*

android studio

找不到compatibility-v4,下载相应文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment