# 安装jdk
sudo yum install java-1.8.0-openjdk-devel
或者你自己安装jdk配置环境变量
# 下载sdk
wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
unzip sdk-tools-linux-3859397.zip
# 添加环境变量
vi /etc/profile
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export PATH=$PATH:/opt/androidSdk/tools/bin
source /etc/profile
# 查看可安装及已安装的包
sdkmanager --list
# 安装包
sdkmanager "build-tools;27.0.2"
sdkmanager "platforms;android-27"
# 更新环境变量
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export PATH=$PATH:/opt/androidSdk/tools/bin
export PATH=$PATH:/opt/androidSdk/platform-tools
# 查看adb是否安装成功
[root@VM-8-12 sdk]# adb --version
Android Debug Bridge version 1.0.40
Version 28.0.2-5303910
Installed as /opt/androidSdk/platform-tools/adb
# 如果出现如下问题,可参考解决
adb shell
-bash: /opt/androidSdk/platform-tools/adb: /lib/ld-linux.so.2: bad ELF interpreter:
没有那个文件或目录
原来是因为系统的问题,因为我的系统是64位的,那adb这个程序是32位的
解决方案:
yum install glibc.i686
yum install libstdc*
yum install libstdc++.so.6
标签:opt,centos,tools,adb,install,androidSdk,PATH,安装 From: https://blog.51cto.com/u_16021118/6140353