一、JDK安装
sudo yum install java-1.8.0-openjdk-devel
二、SDK安装
1、下载SDK
cd /opt mkdir androidSdk wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip unzip sdk-tools-linux-3859397.zip
2、添加环境变量(tools)
vi /etc/profile export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL export PATH=$PATH:/opt/androidSdk/tools/bin
3、SDK管理
#查看可安装及已安装的包 sdkmanager --list #安装包 sdkmanager "package name"
4、添加环境变量(platform-tools)
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL export PATH=$PATH:/opt/androidSdk/tools/bin export PATH=$PATH:/opt/androidSdk/platform-tools
5、安装完成
[root@95 www]# adb --version Android Debug Bridge version 1.0.40 Version 28.0.2-5303910 Installed as /opt/androidSdk/platform-tools/adb
参考链接:http://blog.devwiki.net/index.php/2017/07/20/centos-install-android-sdk.html