centos6.6 Installing the ADB environment

Source: Internet
Author: User

A. Installing the JDK Environment

CentOS Linux JAVA (OPENJDK) package name 1.JAVA-1.7.0-OPENJDK (OPENJDK Runtime Environment) 2.java-1.7.0-openjdk-devel (OPENJDK Development environment)
Yum Install java-1.7. 0-openjdk  java-1.7.  0-openjdk-devel

Pit 1: Previously there was no "java-1.7.0-openjdk-devel", so there was only JRE in the system and no JDK. Subsequent execution of the Gradle command has been an error

Could not find Tools.jar. Please check that/usr/lib/jvm/java-1.8. 0-openjdk-1.8. 0.111-0. B15.EL6_8.X86_64/JRE contains a valid JDK installation.

After you reinstall the JAVA-1.7.0-OPENJDK Java-1.7.0-openjdk-devel, the problem is resolved.

B. Download ANDROIDSDK

CD/Optmkdir androidsdkwget https://dl.google.com/android/repository/ Sdk-tools-linux-3859397.zipUnzip SDK-tools-linux-3859397. zip

B-1. Configuring Environment variables

#vim/etc/profile

export Path USER LOGNAME MAIL HOSTNAME histsize histcontrolexport Path= $PATH:/opt/androidsdk/tools/bin

#source/etc/profile

B-2. View installed information

Sdkmanager--List ... system-images;a...pis;armeabi-v7a |6|Google APIs ARM EABI v7a syste ... system-images;a...google_apis;x86 |6|Google APIs Intel x86 Atom Sys ... system-images;a...gle_apis;x86_64 |6|Google APIs Intel x86 atom_64 ... system-images;a ...; android-tv;x86 |3|Android TV Intel x86 Atom Syst ... System-images;a...ndroid-wear;x86 |1|Android Wear Intel x86 Atom Sy ... system-images;a...google_apis;x86 |4|Google APIs Intel x86 Atom Sys ... system-images;a...s_playstore;x86 |4|Google Play Intel x86 Atom Sys ... tools|26.0.2|Android SDK Tools Available updates:id| Installed |Available------- | -------   | -------Tools|26.0.1|26.0.2

Install the required packages, such as:

" build-tools;26.0.2 "

Pit 2: The Platform-tools downloaded by default installed by this method is 26 and has been reported as error when using the ADB command:

After upgrading the Lib library is invalid, it is possible to download the lower version of platform-tools, which resolves this issue.

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

C. Configuring Environment Variables Vim/etc/profile

... export path USER LOGNAME MAIL HOSTNAME histsize histcontrolexport Path= $PATH:/opt/androidsdk/tools/  Binexport PATH= $PATH:/opt/androidsdk/platform-Tools ...

Then perform the update to take effect
#source/etc/profile

D. Executing the ADB command

-bash:/opt/androidsdk/platform-tools/adb:/lib/ld-linux.so. 2 : Bad ELF interpreter: No that file or directory originally because of the system problem, because my system is 64-bit, that ADB this program is a 32-bit solution: Yum install Glibc.i686yum install LIBSTDC *yum install libstdc++.so. 6

The pit 3:install has been an error in the process:

Error: Multilib version problems found. This often means, the root cause isSomethingElseand multilib version checking isJust pointing outthat there isa problem. Eg.:1. You had an upgrade forNss-softokn-freebl which ismissing some dependency that another package requires. Yum istrying to solve ThisBy installing an older version of nss-softokn-Freebl of the different architecture. IF you exclude the architecture Yum would tell you the root cause is(which package requires). You canTryredoing the upgrade with--exclude Nss-softokn-freebl.otherarch ... Thisshould give you a error message showing the root cause of the problem. 2. You have multiple architectures of nss-softokn-Freebl installed, but Yum can only see a upgrade forOne of those arcitectures. If you don'T want/need both architectures anymore then youCan remove the one with the missing update and everything would work. 3. You have duplicate versions of nss-softokn-Freebl installed already. You can use"Yum Check"ToGetYum Show these errors. ... can also use--setopt=protected_multilib=falseTo remove ThisChecking, however This  isalmost never the correct thing to Do  asSomethingElse  isvery likely to go wrong (often causing much more problems). Protected multilib Versions:nss-softokn-freebl-3.14.3-900.23.3. el6.x86_64! = nss-softokn-freebl-3.14.3- A. el6_6.i686

Tried to delete the conflict library and then reinstall the "nss-softokn-freebl-3.14.3-900.23.3.el6.x86_64"

However, the deletion has caused a lot of system problems, such as Yum,ssh,vim and other commands are not supported. We strongly recommend that you do not delete the library Ah, blood and tears of the lesson AH ~ ~ ~

After the system recovery, found that in fact the error message has been given a very direct ignore the parameters of the check, directly with the good.

Yum Install glibc.i686--setopt=protected_multilib=false

Installation Success ~ ~ Problem solved.

Run adb command again ~ ~ Success ~

centos6.6 Installing the ADB environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.