Ubuntu builds Android development environment

Source: Internet
Author: User
Tags android sdk manager

The preface is migrated to a new notebook, so the Android development environment needs to be reconfigured, the Android website has a configuration tutorial, I just look back
Configure Java Environment Download JDK, official website address: HTTP://WWW.ORACLE.COM/TECHNETWORK/JAVA/JAVASE/DOWNLOADS/INDEX.HTML?SSSOURCESITEID=OTNJP, I downloaded the jdk-7u60-linux-i586.tar.gz, which is suitable for the Ubuntu 64bit OS version.
Unzip the JDK package file:
TAR-ZXVF jdk-7u60-linux-x64.tar.gz

To configure the JDK environment variable:
Modify the ~/.BASHRC file to add the following information to the end of the file according to the JDK directory:
#deploy JDK environmentexport java_home=/home/wzy/downloads/java/jdk1.7.0_60export jre_home= $JAVA _home/jreexport Classpath= $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar#change pathexport path= $JAVA _home/bin: $JRE _home/bin:$ Pathalias sudo= ' sudo env path= $PATH '

source. BASHRC To import environment variables
Verify the effect:

Configure the Android SDK to download the SDK that meets your system requirements from the Android website, primarily to add tools paths, for easy access to the variety of Android-powered instruments.
I downloaded the android-sdk_r23.0.2-linux.tgz, unzip the Android SDK, the command is as follows:
TAR-ZXVF android-sdk_r23.0.2-linux.tgz

After the decompression is complete, the SDK directory:

Under current path, locate the Android file under Tools:

This Android is the Android SDK Manager, which allows you to manage, download and configure the latest SDK. By running Android in the CLI to open Android SDK Manager and tick the tools and packages you need, here Android SDK Manager will default to check the package it recommends, you just need to select the API SDK you need to download and install.

In the event of any inability to I download, Google Eclipse proxy settings

Configure the environment variables to add the following in the ~/.BASHRC file:

#deploy Android SDK environmentexport android_sdk_home=/home/wzy/downloads/android/android-sdk-linuxexport ANDROID_ Tools_path= $ANDROID _sdk_home/toolsexport android_platform_tools_path= $ANDROID _sdk_home/platform-tools#deploy Zhengyi.wzy toolsexport zhengyi_tools_path=~/bin#change pathexport path= $JAVA _home/bin: $JRE _home/bin: $ANDROID _ Tools_path: $ZHENGYI _tools_path: $ANDROID _tools_path: $ANDROID _platform_tools_path: $PATHalias sudo= ' sudo env path=$ PATH '

Configure Eclipse for Eclipse download I will not say, people choose the right version of their own. The main thing here is to solve the eclipse startup problem.
1. After configuring the JDK, start eclipse error

This is mainly related to the Eclipse configuration file, add a JRE soft link, command:
CD your eclipse directory mkdir JRE && cd jreln-s $JRE _home/bin.

2. Ubuntu13.10 Start Eclipse drop-down menu invalidation
This is really a bug, start eclipse under Ubuntu13.10 the drop-down menu will expire, I have a big wipe ah, Google search for a solution, basically is to create a desktop launcher.
Under the Desktop directory in your home directory, create a eclipse.desktop file that reads as follows:
[Desktop Entry] Categories=development; Comment[zh_cn]=comment=exec=/home/wzy/downloads/eclipse/eclipse/eclipsegenericname[zh_cn]=idegenericname= Ideicon=/home/wzy/downloads/eclipse/eclipse/icon.jpegmimetype=name[zh_cn]=eclipsename=eclipsepath= Startupnotify=trueterminal=falsetype=applicationx-dbus-servicename=x-dbus-startuptype=x-kde-substituteuid= Falsex-kde-username=owenexec=env ubuntu_menuproxy=/home/wzy/downloads/eclipse/eclipse/eclipse

However, people like me with desktop cleanliness do not allow the desktop to have extra icons, so I created a startup script and then modified the BASHRC file to start eclipse directly from the command line.
#!/bin/bash# start eclipse from bash shell for Fix eclipse Bug # on Ubuntu13.10export ubuntu_menuproxy=0/home/wzy/download S/eclipse/eclipse/eclipse

Modify the. bashrc file
Alias eclipse=/home/wzy/downloads/eclipse/eclipse/eclipse/start.sh

3. Configuring the Android development environment
The main focus here is the Eclipse install ADT (Android development Tools) plugin.
Open Eclipse, select Help > Install New software ....
Click Add, in Name enter "ADT Plugin" as the name, enter "https://dl-ssl.google.com/android/eclipse/" (no quotation marks) at location,

After adding the plug-in address, select the plug-in address you just added in work with and wait for a moment. The plug-ins that need to be installed will appear below. Select the plugin you want to install and click Install.

Online installation of the way may sometimes be encountered that what that, so you can also download Adt-bundle-linux-x86_64-20140702.zip in advance, choose the way to install offline, I am here is the use of offline installation (offline installation Way we can Google, Keywords: Eclipse android ADT offline install)
Configuring the ADT plug-in
Open Eclipse, select Window > Preferences ... To open the options panel.
Select Android on the left, find the SDK location in the right panel and click Browse ... Select the SDK directory that you installed earlier, and then click Apply.

This allows your ADT to complete its basic configuration.

4. ADB is unable to use because I installed a 64bit operating system, use the ADB times to make the following error: Libstdc++.so.6:cannot open Shared object file:no such file or direct
Directly with the Apt-get installation is not possible, because there is a dependency, I use the aptitude here, artifact Ah, can automatically help me to solve the dependency relationship:

After the installation is complete, it can be used normally, can't use the ADB to scare cry!! (Picture: adb connect my xiaomi 2s)

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.