Java 环境
1 2 3 4
| sudo apt-get update sudo apt-get install default-jre sudo apt-get install default-jdk
|
Android
下载 SDK
1 2 3 4
| ## 下载地址以实际最新为准 wget https://dl.google.com/android/android-sdk_r24.1.2-linux.tgz tar -xvzf android-sdk_r24.1.2-linux.tgz sudo mv android-sdk-linux/ /opt/android-sdk
|
更新 ~/.bash_profile
1 2
| export ANDROID_HOME="/opt/android-sdk" export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
|
更新 SDK
在设置好 HTTP 代理的前提下,查看教程。编辑文件 ~/.android/androidtool.cfg
1 2
| http.proxyPort=8123 http.proxyHost=127.0.0.1
|
1 2 3 4 5 6 7 8
| ## 查看可下载的 SDK android list sdk -u -s
## 更新/下载所有 SDK android update sdk -u -s
## 有选择地更新/下载 SDK,xyz 为上一条命令中获取API对应编号 android update sdk -u -s --filter x,y,z
|
ant 打包
1 2 3 4 5 6 7 8 9 10 11 12
| sudo apt-get install ant
sudo yum install ant
sudo yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686
android update project -p . -t "android-19" -n "PackDemo"
ant release
|
gradle 打包
安装 gradle
1 2 3
| wget https: unzip gradle-2.9-bin.zip sudo mv gradle-2.9 /usr/local/
|
更新 ~/.bash_profile
1 2
| export GRADLE_HOME="/usr/local/gradle-2.9" export PATH="$GRADLE_HOME/bin:$PATH"
|
打包