Linux 安装 Android SDK

先安装jdk

RUN apt-get install default-jdk
参考:http://t.zoukankan.com/braveym-p-6143356.html

mkdir -p $HOME/install/android-sdk
wget https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
unzip commandlinetools-linux-9123335_latest.zip -d $HOME/install/android-sdk

export ANDROID_HOME=$HOME/install/android-sdk
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/build-tools/33.0.1/:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/bin:$PATH"

sdkmanager --update --sdk_root=$ANDROID_HOME
sdkmanager --list --sdk_root=$ANDROID_HOME

sdkmanager --sdk_root=$ANDROID_HOME "build-tools;33.0.1" "platform-tools" "platforms;android-33" "tools"
sdkmanager --licenses --sdk_root=$ANDROID_HOME

转载https://testerhome.com/topics/35439

你可能感兴趣的:(linux,android,运维)