Linux under CentOS install Android SDK latest comprehensive tutorial "feasible"

Source: Internet
Author: User
Tags openldap android sdk manager gstreamer

1. This tutorial resolves the possibility of entering ADB in the command or prompting for errors after you have configured the environment variables for the Android SDK. Now provide you with the latest solution, this method can also solve the latest CentOS 6.5 version

2. This tutorial supports the latest java8, and this is an example.

Tools/Materials
    • Java8:http://www.oracle.com/technetwork/java/javase/downloads/index.html

    • Note: Ubuntu selected tar.gz suffix; CentOS Select RMP suffix

    • Android SDK (including Eclipse within): http://developer.android.com/sdk/index.html

    • Note: When downloading the SDK, Linux dot download for other platforms to choose Linux 64-bit or Linux 32-bit downloads according to their system type

Method/Step
  1. Uninstalling the old version of the JDK

    1. Enter $ java-version in the command view version

    Java version "1.7.0_19" OpenJDK Runtime Environment (rhel-2.3.9.1.el6_4-x86_64) OpenJDK 64-bit Server VM (build 23.7-b01, M ixed mode)

    2. View the OPENJDK installation package

    $ rpm-qa |grep javatzdata-java-2013b-1.el6.noarchjava-1.6.0-openjdk-1.6.0.0-1.61.1.11.11.el6_4.x86_ in command 64java-1.7.0-openjdk-1.7.0.19-2.3.9.1.el6_4.x86_64

    3. Uninstall

    $ su

    Password: $ rpm-e--nodeps java-1.7.0-openjdk-1.7.0.19-2.3.9.1.el6_4.x86_64

    $ rpm-e--nodeps java-1.6.0-openjdk-1.6.0.0-1.61.1.11.11.el6_4.x86_64 $ rpm-e--nodeps tzdata-java-2013b-1.el6.noarch

    4. Installing the JDK

    Download jdk1.8.0_05

    Enter the directory where the $ cd/jdk1.8.0_0

    $ RPM-IVH jdk-7u17-linux-x64.rpm

    The above installation, such as a small error can be Baidu, and according to their own circumstances for small adjustment, this tutorial is mainly for the later part of the processing of errors, there is no error on the network processing information, and related information is not comprehensive.

  2. Configuration of the JDK environment variable:

    Method One: $vi/etc/profile

    Enter o and at the end add the following:

    #set Java Environment

    Export java_home=/usr/java/jdk1.8.0_05

    Export JRE_HOME=/USR/JAVA/JDK1.8.0_05/JRE

    Export path= $PATH: $JAVA _home/bin: $JRE _home/bin

    Export classpath=: $CLASSPATH: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib: $JAVA _home/lib

    Export Jaca_home

    Export PATH

    Export CLASSPATH

    Then make the environment variable effective immediately

    $source/etc/profile

    Whether the test was successful

    Input #java-versionjava Version "1.8.0_05" Java (tm) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot (tm) 64-bit Server VM (build 25.5-b02, Mixed mode)

    Method Two:

    [Email protected]]# sudo nautilus

    Pop-up window Select file = "Open parent file =" Find etc= "find profile (can be located at the location of the search) open profiles, add at the bottom

    #set Java Environment

    Export java_home=/usr/java/jdk1.8.0_05

    Export JRE_HOME=/USR/JAVA/JDK1.8.0_05/JRE

    Export path= $PATH: $JAVA _home/bin: $JRE _home/bin

    Export classpath=: $CLASSPATH: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib: $JAVA _home/lib

    Export Jaca_home

    Export PATH

    Export CLASSPATH

    Whether the test was successful

    Input #java-versionjava Version "1.8.0_05" Java (tm) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot (tm) 64-bit Server VM (build 25.5-b02, Mixed mode)

  3. Installing the Android SDK

    1. Download the Android SDK

    Here I created the folder under/home/cc/own user Kaifa

    2. I put the adt-bundle-linux-x86_64-20140321 (my 64-bit, which may appear after the ADB error problem, will be resolved later) extracted into the/home/cc/kaifa inside

    3 Opening/home/cc/kaifa/adt-bundle-linux-x86_64-20140321/eclipse/eclipse

    4. After running Eclipse Point source under the Android download icon (mouse on that stay will prompt Android SDK Manager) point Open after point right lnstall packages ... Download the package you need, it may take some time, some of the package is not good, focus on the next.

    5. Configuring the variable Environment

    Method One:

    Command: VI ~/.BASHRC, add the following at the end: Export path= $PATH {}:/home/cc/kaifa/adt-bundle-linux-x86_64-20140321/sdk/platform-tools :/home/cc/kaifa/adt-bundle-linux-x86_64-20140321/sdk/tools

    Then press ESC and press ":" To enter WQ

    Restart your computer

    Method Two:

    [Email protected]]# sudo nautilus

    Locate the. bashrc file in the root folder that you opened, and at the end add

    Export path= $PATH {}:/home/cc/kaifa/adt-bundle-linux-x86_64-20140321/sdk/platform-tools:/home/cc/kaifa/ Adt-bundle-linux-x86_64-20140321/sdk/tools

    Then save and restart the computer

  4. Installing ADT

    1. Open Eclipse

    2. Click Hlep

    3. Point Lnstall New Software ...

    4. In work WIFH: Enter https://dl-ssl.google.com/android/eclipse/

    then enter. Look, it's HTTPS, right?

    5. After a while, there will be two files under name, and you can hook up to cancel

    Then click Next and click OK

    Tip An error may occur when you press the ADT. The reason is the ADB issue

    In order to enter the ADB will appear error or not, the solution is as follows

  5. If there is an error that is because the ADB is 32-bit, to install ia32-libs. Ubuntu below is sudo apt-get install Ia32-libs

    CentOS is not a good way to install Deb, but you can use it after you unzip the Deb.

    Enter in the command

    #yum Install glibc.i686

    What the? You can't do that? Yes, there may be no glibc.i686 when you enter this command. What to do, then copy the following Long command, and then enter the execution:

    #yum  install alsa-lib-devel.i686 alsa-lib-devel audiofile-devel.i686 audiofile-devel  cups-devel.i686 cups-devel dbus-devel.i686 dbus-devel fontconfig-devel.i686  fontconfig-devel freetype.i686 freetype-devel.i686 freetype-devel giflib-devel.i686  giflib-devel lcms-devel.i686 lcms-devel libice-devel.i686 libice-devel  libjpeg-turbo-devel.i686 libjpeg-turbo-devel libpng-devel.i686 libpng-devel  libsm-devel.i686 libsm-devel libusb-devel.i686 libusb-devel libx11-devel.i686  Libx11-devel libxau-devel.i686 libxau-devel libxcomposite-devel.i686 libxcomposite-devel  libXcursor-devel.i686 libXcursor-devel libXext-devel.i686 libXext-devel  libxi-devel.i686 libxi-devel libxinerama-devel.i686 libxinerama-devel libxml2-devel.i686  libxml2-devel libxrandr-devel.i686 libxrandr-devel libXrender-devel.i686 libXrender-devel libxslt-devel.i686 libxslt-devel  libxt-devel.i686 libxt-devel libxv-devel.i686 libxv-devel libxxf86vm-devel.i686  libxxf86vm-devel mesa-libgl-devel.i686 mesa-libgl-devel mesa-libglu-devel.i686  Mesa-libglu-devel ncurses-devel.i686 ncurses-devel openldap-devel.i686 openldap-devel  openssl-devel.i686 openssl-devel zlib-devel.i686 pkgconfig sane-backends-devel.i686  sane-backends-devel xorg-x11-proto-devel glibc-devel.i686 prelink fontforge  flex bison libstdc++-devel.i686 pulseaudio-libs-devel.i686 gnutls-devel.i686  libgphoto2-devel.i686 openal-soft-devel openal-soft-devel.i686 isdn4k-utils-devel.i686  gsm-devel.i686 samba-winbind libv4l-devel.i686 cups-devel.i686 libtiff-devel.i686  Gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 gettext-devel.i686 libmpg123-devel.i686 

    After installation, re-install ADT, method back to fourth install ADT, after installation is complete.

    I wish you success.

Linux under CentOS install Android SDK latest comprehensive tutorial "feasible"

Related Article

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.