Build an Android development environment in Ubuntu 12.10 and use ubuntuandroid

Source: Internet
Author: User
Tags android sdk manager

Build an Android development environment in Ubuntu 12.10 and use ubuntuandroid

Preparation instructions: There is no rmp tool on Ubuntu, So we download the tar package during the download.

 

1. Install jdk

Download java jdk for linux from the official website of El.

After the download is complete, copy the file to the directory you want to place and decompress it.

Tar zvxf jdk's name.tar

 

To configure the environment variables, you must switch to the root user permission.

To switch to the root user, you need to set the password for the root user:

Sude passwd root

Enter the password twice. After the password is set successfully, switch to the root user permission.

Su root

Then enter the password and then edit the jdk environment variable.

Gedit/etc/profile

The editor will pop up and add the content directly at the top of the file.

JAVA_HOME =/opt/java/jdk1.8.0 _ 25

PATH = $ JAVA_HOME/bin: $ PATH

CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar

Export JAVA_HOME

Export PATH

Export CLASSPATH

 

Note: JAVA_HOME is the directory where you install jdk. After editing, save the settings and close the settings.

 

2. Install eclipse

On the elicpse official website, download ecliapse for linux.

After the download is complete, copy the file to the directory you want to place and decompress it.

Tar zvxf jdk's name.tar

At this time, double-click eclipse to run it.

 

3. Install the android sdk

Download the android sdk from the android official website.

Similarly, you need to decompress the package to the desired directory. Note that you should not place the directory under the directory that requires root permission control. Otherwise, the sdk may not be updated.

 

4. Install adt

In the same way as in windows, directly go to eclispe-> help-> installnew software and enter:

Https://dl-ssl.google.com/android/eclipse

Select the DDMS check box and then click Next.

After the installation is complete, it will show you the path to select androidsdk or download it directly. You can select the path in step 3.

 

5. Update the android sdk

After the installation is complete, open eclipse and you will find that you have no android sdk manager. How can I start it? Open the directory of adnroid sdk through the terminal, and then enter

./Android

You can open sdkmanager

 

6. Real machine debugging

First, give the system a usb configuration file.

Sudo gedit/etc/udev/rules. d/50-android.rules

Input

SUBSYSTEM = "usb", SYSFS {idVendor} = "0bb4", MODE = "0666"

Save and exit. Execute this configuration,

Sudo chmod a + rx/etc/udev/rules. d/50-android.rules

Then restart adb or eclipse to take effect.

 

If you have more models, add the following content:

# ACS 0502

SUBSYSTEM = "usb", SYSFS {idVendor} = "0502", MODE = "0666"

# Dell 413c

SUBSYSTEM = "usb", SYSFS {idVendor} = "413c", MODE = "0666"

# Foxconn 0489

SUBSYSTEM = "usb", SYSFS {idVendor} = "0489", MODE = "0666"

# Garmin-Asus 091E

SUBSYSTEM = "usb", SYSFS {idVendor} = "091e", MODE = "0666"

# HTC 0bb4

SUBSYSTEM = "usb", SYSFS {idVendor} = "0bb4", MODE = "0666"

# Huawei 12d1

SUBSYSTEM = "usb", SYSFS {idVendor} = "12d1", MODE = "0666"

# Kyocera 0482

SUBSYSTEM = "usb", SYSFS {idVendor} = "0482", MODE = "0666"

# LG 1004

SUBSYSTEM = "usb", SYSFS {idVendor} = "1004", MODE = "0666"

# Motorola 22b8

SUBSYSTEM = "usb", SYSFS {idVendor} = "22b8", MODE = "0666"

# Nvidia 0955

SUBSYSTEM = "usb", SYSFS {idVendor} = "0955", MODE = "0666"

# Pantech 10A9

SUBSYSTEM = "usb", SYSFS {idVendor} = "10A9", MODE = "0666"

# Samsung 04e8

SUBSYSTEM = "usb", SYSFS {idVendor} = "04e8", MODE = "0666"

# Sharp 04dd

SUBSYSTEM = "usb", SYSFS {idVendor} = "04dd", MODE = "0666"

# Sony Ericsson 0fce

SUBSYSTEM = "usb", SYSFS {idVendor} = "0fce", MODE = "0666"

# ZTE 19D2

SUBSYSTEM = "usb", SYSFS {idVendor} = "19D2", MODE = "0666"

 

[Note] For the above USB Vendor ID, different vendors may be different, refer:

Company

USB Vendor ID

Acer

0502

ASUS

0b05

Dell

413c

Foxconn

0489

Fujitsu

04c5

Fujitsu Toshiba

04c5

Garmin-Asus

091e

Google

18d1

Hisense

Limit B

HTC

0bb4

Huawei

12d1

K-Touch

24e3

KT Tech

2116

Kyocera

0482

Lenovo

17ef

LG

1004

Motorola

22b8

MTK

0e8d

NEC

0409

Nook

2080

Nvidia

0955

OTGV

2257

Pantech

10a9

Pegatron

1d4d

Philips

0471

PMC-sisierra

04da

Qualcomm

05c6

SK Telesys

1f53

Samsung

04e8

Sharp

04dd

Sony

054c

Sony Ericsson

0fce

Teleepoch

2340

Toshba

0930

ZTE

19d2

 

Others

If aapt: error while loadingshared libraries: libstdc ++. so.6: cannot open shared object file: No such fileor directory

The reason is that ubuntu and ia32_libs are discarded, resulting in no 32-bit lib library. You need to download the library.
Sudo apt-get install lib32stdc ++ 6

If the above line is invalid, You need to execute the following line

Sudo apt-get install lib32z1

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.