下载android sdk命令行工具
https://developer.android.com/studio?hl=zh-cn#command-tools
mkdir android-sdk
cd android-sdk
unzip commandlinetools-linux-11076708_latest.zip
添加环境变量到~/.bashrc
export ANDROID_HOME=$HOME/android-sdk
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/bin
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/
下载sdk
sdkmanager "platform-tools" "platforms;android-34"
sdkmanager --license --sdk_root=./
编译工程
./gradlew assembleDebug