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. oracle 执行顺序 select查询优化

    今天把这几天做的练习复习了一下,不知道自己写得代码执行的效率如何以及要如何提高,于是乎上网开始研究一些材料,现整理如下: 首先,要了解在Oracle中Sql语句运行的机制.以下是sql语句的执行步骤: ...

  2. 100-days: nineteen

    Title: Figure skating(花样滑冰): Olympic(奥林匹克的) champion Hanyu says '100 percent' on(引出时机) return to ice ...

  3. swift 警告框 - 自定义按钮颜色,图片

    1.封装 弹框http://www.hangge.com/blog/cache/detail_651.html import UIKit extension UIAlertController { / ...

  4. Spring MVC 的 Converter 和 Formatter

    Converter 和 Formatter 都可用于将一种对象类型转换成另一种对象类型. Converter 是通用元件,可以将一种类型转换成另一种类型,可以在应用程序中的任意层中使用: Format ...

  5. Android 软件管理工具类Utils

    Android 软件管理工具类Utils /** * Created by uilubo on 2015/9/30. * 工具类 */ public class Utils { public stat ...

  6. Vue post提交

    vue中的axios 是不直接支持post方法的,所以我们得绕一下路,我目前在登录的时候运用到了,服务器端用php,可以收到数据 let param = new URLSearchParams(); ...

  7. ABP框架系列之三十九:(NLayer-Architecture-多层架构)

    Introduction Layering of an application's codebase is a widely accepted technique to help reduce com ...

  8. Pattern Design - Strategy Pattern

    If you can disassemble code  and  you want to apply one method of an object in another object that t ...

  9. jsp和html的区别

    html是超文本标记语言,只要有浏览器,就可以显示出来了. jsp是java server page就是在java服务器端的页面,需要通过jdk的编译才可以显示在客户端的浏览器上. 不仅如此,jsp还 ...

  10. elasticsearch搜索引擎环境的搭建

    elasticsearch 搜索引擎 解决了什么问题:在我们数据量很大时,我们使用模糊查询会使索引列的索引消失,这样使用elasticsearch来提高查询效率. 存在什么问题:有时我们查询的词,el ...