Skip to content

Instantly share code, notes, and snippets.

@liuzhitao2000
Last active December 31, 2015 17:39
Show Gist options
  • Save liuzhitao2000/8021715 to your computer and use it in GitHub Desktop.
Save liuzhitao2000/8021715 to your computer and use it in GitHub Desktop.

#Installation

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

export M2_HOME=/Users/akira/soft/apache-maven-3.0.5
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH
export ANDROID_HOME="/Applications/Android_Studio.app/sdk"
export PATH=$PATH:/Applications/Android_Studio.app/sdk/platform-tools/
export PATH=$PATH:/Applications/Android_Studio.app/sdk/tools/

设置软连接

ln -s $ANDROID_HOME/build-tools/19.0.1/aapt $ANDROID_HOME/platform-tools/aapt

更新sdk

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

###1. 安装maven

###2. 用maven-android-deployer安装需要的插件

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

###3. clone外部依赖的项目(有改动或二次开发需求可以fork) ####clone

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-times-square.git
git clone https://github.com/mibang-inc/Android-ViewPagerIndicator.git

####fork

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

###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
mvn install android:deploy android:run -Dandroid.device=usb
mvn install android:deploy -Dandroid.device=emulator

###8.FAQ

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

android studio

@produmpling
Copy link

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