Ubantu Configuring the Android Development environment (Ubuntu 12.04.4 LTS x64 dell 3420)

Source: Internet
Author: User
Tags echo command android sdk manager

Since each reinstallation of the system to reinstall the software, reconfigure the options, and the installation steps under the Ubantu are often troublesome, here the specific steps to record, in order to later view, so as to avoid the trouble of re-locating the installation steps.

The ADB program in the 1.Android SDK is 32-bit, and Ubuntu x64 system needs to install 32-bit library files for compatibility with 32-bit programs. My system is 64-bit, and if not installed, ADB will make an error: java.io.ioexception:error=2

sudo apt-get install-y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1

2. Updating the JDK

sudo apt-get install OPENJDK-7-JDK

3. Download the pure sdk:http://developer.android.com/sdk/index.html without the IDE from the official address, unzip it after downloading, move to the Usr/local folder, and change the permissions

A. Extracting files

  TAR-ZXVF android-sdk_r23.0.2-linux.tgz Generating Android-sdk-linux directory

B. Catalog files

sudo mv Android-sdk-linux/usr/local/android/

C. Change the file owner, otherwise prompt no permissions

sudo chown-r user android-sdk-linux, where-R is recursive and user is the current username

4. Configure environment variables, pay attention to the correct input 

echo ' Export android_home= '/usr/local/android/android-sdk-linux ' >> ~/.BASHRC

    echo ' Export path= ' $PATH: $ANDROID _home/tools: $ANDROID _home/platform-tools "' >> ~/.BASHRC

    echo ' Export java_cmd= '/usr/lib/jvm/java-7-openjdk-amd64/bin/java ' >> ~/.BASHRC

  After execution, the source causes the environment variable to take effect immediately:

    SOURCE ~/.BASHRC

  Then look at the environment variables through the echo command to make sure the input is correct:

    Echo $PATH

    Echo $JAVA _cmd

See if the value is set.

5. Launch Android SDK Manager

  Android

6. The SDK cannot update the phenomenon, is due to domestic access to Google Internet speed is too slow, the use of agents, set as follows:

① in the Android SDK Manager Setting window set the HTTP proxy server and HTTP proxy port 2 parameters, respectively, set to:

HTTP Proxy server:mirrors.neusoft.edu.cn

HTTP Proxy por:80

②options>force. Http://...sources to is fetched using http: Select this option

③packages>reload can

7. Download the latest version of Ide,android Studio:https://developer.android.com/sdk/installing/studio.html#download

sudo unzip android-studio-ide-135.1538390-linux.zip after decompression

Chown-r User Android-studio Change permissions

CD android-studio/bin/

./studio.sh Run

Reference blog:

Http://www.cnblogs.com/sink_cup/archive/2011/10/31/ubuntu_x64_android_sdk_java.html

http://www.oschina.net/question/265039_173445

Http://bbs.9ria.com/thread-200667-1-1.html

Ubantu Configuring the Android Development environment (Ubuntu 12.04.4 LTS x64 dell 3420)

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.