Configure the android environment in Linux

Source: Internet
Author: User
  • Open the command line terminal, perform the first system update and install necessary software packages.

    shawn@e014-anle-lnx:~$ sudo su# apt-get install aptitude# aptitude update# aptitude full-upgrade## aptitude -y install sysv-rc-conf subversion subversion-tools python-svn git-core git-svn binutils binutils-dev binutils-static libncurses5-dev libncursesw5-dev ncurses-term ncurses-hexedit g++ gcc automake1.9 dialog bison build-essential zlib1g-dev flex gperf libwxgtk2.6-dev libcurses-widgets-perl libcurses-perl libcurses-ui-perl libcurses-ruby libruby1.8 libsdl1.2-dev valgrind ncurses-dev libtool libx11-dev vim-gnome exuberant-ctags tree meld pbzip2 wget unrar unzip wmii dwm# exitexitshawn@e014-anle-lnx:~$
  • Obtain jdk1.5, Eclipse, Android SDK, and repo, and copy the following files to the local folder.
    Jdk-1_5_0_22-linux-i586.bin
    Eclipse-linux.tar.tgz
    Android-sdk-linux.tar.tgz
    Repo
  • Install jdk1.5
    shawn@e014-anle-lnx:~$ sudo su# chmod 777 jdk-1_5_0_22-linux-i586.bin# ./jdk-1_5_0_22-linux-i586.bin# mv jdk1.5.0_22 /usr/local/# ln -s /usr/local/jdk1.5.0_22 /usr/local/jdk1.5# exitexitshawn@e014-anle-lnx:~$
  • Create the android tool directory/home/Android/and copy the script repo to/home/Android/bin.
    shawn@e014-anle-lnx:~$ cd /homeshawn@e014-anle-lnx:/home$ sudo mkdir androidshawn@e014-anle-lnx:/home$ sudo chmod 777 androidshawn@e014-anle-lnx:/home$ mkdir /home/android/binshawn@e014-anle-lnx:/home$ mv /home/shawn/repo /home/android/bin/shawn@e014-anle-lnx:/home$ chmod 777 /home/android/bin/repo
  • Decompress eclipse to/home/Android/Eclipse/, and Android SDK to/home/Android/SDK/
    shawn@e014-anle-lnx:/home$ tar xf /home/shawn/eclipse-linux.tar.tgz -C /home/android/shawn@e014-anle-lnx:/home$ tar xf /home/shawn/android-sdk-linux.tar.tgz -C /home/android/
  • Configure Environment Variables
    shawn@e014-anle-lnx:~$ sudo su# echo "PATH=/usr/local/jdk1.5/bin:/home/android/sdk/tools:/home/android/sdk/platform-tools:/home/android/bin:/home/android/eclipse:$PATHCLASSPATH=/usr/local/jdk1.5/lib:.JAVA_HOME=/usr/local/jdk1.5ANDROID_JAVA_HOME=$JAVA_HOMEGIT_SSH=sshexport PATH CLASSPATH JAVA_HOME ANDROID_JAVA_HOME GIT_SSH" >>/etc/bash.bashrc
  • Verify whether the configuration is successfully installed and re-open a command line terminal
    Shawn @ e014-anle-lnx :~ $ Eclipse & # You can start eclipseshawn @ e014-anle-lnx :~ $ Android

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.