Ubuntu android development configuration, ubuntuandroid

Source: Internet
Author: User

Ubuntu android development configuration, ubuntuandroid

1.Install JavaSDK

1.1 download the java-sun-1.7.1.tar.gz to the Downlowd directory

1.2 create the java directory sudo makrdir/usr/java

1.3 unzip: tar-zxvf java-sun-1.7.1.tar.gz

Pwd:/home/../Download/jdk1.7.1

1.4 Move the current directory to the Created directory: sudo mv jdk1.7.1/usr/java

1.5 EDIT: sudo vi/etc/profile

JAVA_HOME =/usr/java/jdk1.7.1

Export JRE_HOME =/usr/java/jdk1.7.1/jre

Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH

Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH

: Wq -- save changes

1.6 Configuration File Effective: source/etc/profile

It is only useful for the current shell. After it is turned off, it will no longer take effect. You need to restart it to make it take effect in different places.

1.7 verification: the java-version has the corresponding version information, indicating that the installation is successful.

2. Install Eclipse

1. Go to the official website to Download Eclipse. the version I downloaded to the Download directory is:

Eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz

2. In ~ Under the directory, I create a program dedicated to put my own running software and decompress it:

Tar-zxvf eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz

3. Mobile mv jdk1.7.0 _ 67 ~ /Program/

4. Click eclipse under the eclipse directory, select the workspace, and lock the chart to the taskbar.

3. Install ADT

1. Go to http://adt.android-studio.org/download ADT linux: I downloaded ADT-23.0.2

2. Start Eclipse

3. Click "Help> Install New Software ..."

4. Click "Add..." to Add the adt-23.0.2.zip package.

5. Select the corresponding plug-in for installation, and then Next, next, next... and restart Eclipse.

4. Install the Android SDK

1. Go to http://sdk.android-studio.org/download android-sdk_r24.3.4-linux.tgz

2. decompress:

Tar-zxvf android-sdk_r24.3.4-linux.tgz

3. Put it in my favorite directory. Here I put it in my ~ Under

Mv android-sdk-linux ~

4. Configure the environment and download the corresponding SDK version:

Start Eclispe and click windows> prefernece to configure the android SDK path.

Click the Eclipse android sdk manager button to display the corresponding interface:

I downloaded: API 14, Tools: Android SDK Build-tools 23.0.2 ::

  

 

In this way:

Create an android project HellowWorld for testing. Because the minimum version must be API14, select the corresponding version.

After a project is created, the R file may not be generated because you have not created the Android Virtual Device Manager: Create an AVD:

Click OK.

Start the android virtual machine:

 

Run your android project in the Eclipse file:

 

There may be two reasons why the virtual machine cannot be started. One is that your BISO must support virtual machines.

In addition, some Ubuntu dependent packages are not downloaded. If you encounter any problems, you can use Baidu to solve them.

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.