a.安装JDK环境

centos linux JAVA(openjdk)软件包名
1.java-1.7.0-openjdk (OpenJDK Runtime Environment)
2.java-1.7.0-openjdk-devel (OpenJDK Development Environment)
 
yum install java-1.7.-openjdk  java-1.7.-openjdk-devel

坑1: 之前因为没有装”java-1.7.0-openjdk-devel”,所以系统里只有jre而没有jdk。后续在执行gradle命令时一直报错

Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.-openjdk-1.8.0.111-.b15.el6_8.x86_64/jre contains a valid JDK installation.

后再重新安装了 java-1.7.0-openjdk  java-1.7.0-openjdk-devel之后,问题解决。

b.下载androidSdk

cd /opt

mkdir androidSdk

wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip

unzip sdk-tools-linux-.zip

b-1. 配置环境变量

#vim /etc/profile

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export PATH=$PATH:/opt/androidSdk/tools/bin

#source /etc/profile

b-2. 查看已安装信息

sdkmanager --list

    ......
system-images;a...pis;armeabi-v7a | | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | | Google APIs Intel x86 Atom Sys...
system-images;a...gle_apis;x86_64 | | Google APIs Intel x86 Atom_64 ...
system-images;a...;android-tv;x86 | | Android TV Intel x86 Atom Syst...
system-images;a...ndroid-wear;x86 | | Android Wear Intel x86 Atom Sy...
system-images;a...google_apis;x86 | | Google APIs Intel x86 Atom Sys...
system-images;a...s_playstore;x86 | | Google Play Intel x86 Atom Sys...
tools | 26.0. | Android SDK Tools Available Updates:
ID | Installed | Available
------- | ------- | -------
tools | 26.0. | 26.0.

安装需要的包,如:

sdkmanager "build-tools;26.0.2"

坑2:通过这种方法默认安装的platform-tools 下载的是26,在使用adb命令时一直报如下的错:

升级lib库无效后,想到可以下载低版本的platform-tools,此问题解决。

platform tools下载地址

http://downloads.puresoftware.org/files/android/platform-tools/

c.配置环境变量  vim /etc/profile

...
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export PATH=$PATH:/opt/androidSdk/tools/bin
export PATH=$PATH:/opt/androidSdk/platform-tools
...

然后执行更新生效
#source /etc/profile

d.执行adb命令

-bash: /opt/androidSdk/platform-tools/adb: /lib/ld-linux.so.: bad ELF interpreter: 没有那个文件或目录

原来是因为系统的问题,因为我的系统是64位的,那adb这个程序是32位的

解决方案:
yum install glibc.i686
yum install libstdc*
yum install libstdc++.so.

坑3: install的过程中一直报错:

错误: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.: . You have an upgrade for nss-softokn-freebl which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of nss-softokn-freebl of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude nss-softokn-freebl.otherarch ... this should give you an error
message showing the root cause of the problem. . You have multiple architectures of nss-softokn-freebl installed, but
yum can only see an upgrade for one of those arcitectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work. . You have duplicate versions of nss-softokn-freebl installed already.
You can use "yum check" to get yum show these errors. ...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems). Protected multilib versions: nss-softokn-freebl-3.14.-900.23..el6.x86_64 != nss-softokn-freebl-3.14.-.el6_6.i686

试过想删除这个冲突库,然后再重新install   “nss-softokn-freebl-3.14.3-900.23.3.el6.x86_64”

但是删除掉之后引发了很多系统问题,如yum,ssh,vim等命令均不支持。 强烈建议大家不要乱删库啊,血和泪的教训啊 ~~~

系统恢复后,发现其实错误信息里已经给出了很直接的忽略检查的参数,直接用就好了。。

yum install glibc.i686 --setopt=protected_multilib=false

安装成功~~ 问题解决。

再次运行adb命令 ~~ 成功~

centos6.6 安装adb环境的更多相关文章

  1. CentOS6.4安装Golang环境

    什么是Go? Go是一门并发支持.垃圾回收的编译型的系统编程语言,目的是为了创造一门具有在静态编译语言的高性能和动态语言的高效开发之间拥有良好平衡点的一门编程语言. Go的主要特点有哪些? 类型安全和 ...

  2. 在linux CentOS6上安装web环境

    感谢浏览,欢迎交流=.= 都说linux作为服务器优于window,近期也是学习了下linux. win7下安装了linux虚拟机,购买linux阿里云主机,开启linux之旅. 进入正题,在linu ...

  3. centos6.5安装lnmp环境

    1.安装nignx的源,默认cenots6没有的. rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-cent ...

  4. CentOS6.5安装LAMP环境APACHE的安装

    1.卸载apr.apr-util [root@centos6 LAMP]# yum remove apr apr-util 2.编译安装apr-1.5.1.tar.gz [root@centos6 L ...

  5. centos6.2安装桌面环境 与中文支持

    yum groupinstall "X Window System" //安装Xorgyum groupinstall "Desktop" //安装GNOMEy ...

  6. Centos6.5安装JDK环境

    1,系统版本查看 2,下载jdk1.8 wget http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c ...

  7. Centos6.5 安装lnmp环境

    最近项目要配置在nginx上,所以搜索了下具体nginx的安装,看到这篇文章简洁明了而且测试成功就借用了,作品出处:http://www.cnblogs.com/xiaoit/p/3991037.ht ...

  8. centos6.5 安装linux 环境

    准备工作 安装make yum -y install gcc automake autoconf libtool make 安装g++ yum install gcc gcc-c++下面正式开始--- ...

  9. CentOS6.4安装LAMP环境

    1.配置防火墙,开放80.3306端口 vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport - ...

随机推荐

  1. 转 - spring security oauth2 password授权模式

    原贴地址: https://segmentfault.com/a/1190000012260914#articleHeader6 序 前面的一篇文章讲了spring security oauth2的c ...

  2. C++重写(覆盖)、重载、重定义、

    总结: 重写(覆盖)override 是指派生类函数重写(覆盖)基类函数 不同的范围,分别位于基类和派生类中 函数的名字相同 参数相同 基类函数必须有virtual关键字 重载overload 成员函 ...

  3. Eclipse Android 模拟器启动过慢

    打开AVD Manager窗口,在模拟器配置页面,选择Intel Atom (x86)选项.笔记本的CPU处理器是Intel 酷睿. 可以发现模拟器的启动速度明显变快.

  4. 通过DOS界面查看电脑上端口使用情况

    如何查看查看端口是否被占用? 打开电脑上的运行,输入cmd,进入DOS界面. 然后输入       netstat -an     即可显示电脑上所用的端口使用情况! 状态显示 LISTENING就表 ...

  5. [leetcode]94. Binary Tree Inorder Traversal二叉树中序遍历

    Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] ...

  6. maven打包不包含配置文件[z]

    如果使用maven-jar-plugin和maven-dependency-plugin打包,排除配置文件的方法: 上面的配置是把resources下的配置文件不打进项目的jar包中,主要使用的是&l ...

  7. Aria2+WebUI,迅雷倒下之后的代替品

    Aria2+WebUI,迅雷倒下之后的代替品 (2017-07-24 12:56:28) 转载▼   分类: 软件 最近迅雷越来越作死了,砍第三方远程下载,强推迅雷9喂用户的屎,下载资源能砍就砍,以前 ...

  8. 选择困难症的福音——团队Scrum冲刺阶段-Day 7

    选择困难症的福音--团队Scrum冲刺阶段-Day 7 今日进展 测试代码 将界面设计完后放app使用示意图于此 今日贡献量 严域俊 吴恒佚 曾程 刘辰 邓煜坤 3.5 3.5 3.3 3.6 3 贡 ...

  9. [Django] Window上通过IIS发布Django网站

    网上的教程坑实在多,以下是本人亲测通过的: 需要解决的问题: 1.使用 python manage.py runserver 来运行服务器,只适用测试环境中使用,正式发布的服务,需要一个可以稳定而持续 ...

  10. 分布式锁三种实现方式(DB,redis,zookeeper)比较

    先贴出看到的一篇博客,后续补充自己总结分析的. https://blog.csdn.net/u010963948/article/details/79006572