Install the android eclipse development environment in Ubuntu

Source: Internet
Author: User
Tags android sdk manager

Author: Liu Hongtao,Hua Qing vision embedded training center lecturer.

Record the setup process of installing the android eclipse development environment for the fs_s5pc100 platform on Ubuntu. Use Ubuntu 10.10.

1. Install JDK

(1) install JDK. bin in the "Linux-android \ toolchain" directory. JDK. Bin is jdk1.5. Jdk1.5 is a required tool for compiling android2.1, and can only be 1.5. Other versions (such as 1.6) do not work.

Copy "JDK. bin" to the "/usr" directory, run the command, and install it as prompted.

# Sudo./JDK. Bin

(2) After installation, configure the environment variables:

~ $ Sudo Vim/etc/environment

Add the path (red font) to the end of the PATH variable:

Path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/ARM/4.2.2-Eabi/usr/bin:/usr/jdk1.5.0 _ 21/bin

Save and exit and execute:

Source/etc/environment

2. Install the SDK

Note: The latest SDK can be downloaded at http://developer.android.com/sdk/index.html. The android-sdk-linux_x86-1.6_r1.tgz in the installation package is used here. The updated SDK will also be downloaded in the anroid SDK manager after the ADT is installed in eclipse.

(1) unzip the android-sdk-linux_x86-1.6_r1.tgz to/home/Linux

(2) create a soft connection to facilitate later version updates

# Ln-s android-sdk-linux_x86-1.6_r1 Android-SDK

(3) create a virtual machine platform AVD

Linux @ Ubuntu :~ /Android-SDK/tools $./Android create AVD-N fs100-T 2
The Android 1.6 is a basic Android platform.
Do you wish to create a custom hardware profile [No] y

Device Ram size: the amount of physical RAM on the device, in megabytes.
HW. ramsize [96]: 128

Touch-screen support: whether there is a touch screen or not on the device.
HW. touchscreen [Yes]: Yes

Track-ball support: whether there is a trackball on the device.
HW. trackball [Yes]: No

Keyboard support: whether the device has a QWERTY keyboard.
HW. keyboard [Yes]: N

DPAD support: whether the device has DPAD keys
HW. DPAD [Yes]: Y

GSM Modem support: whether there is a GSM Modem in the device.
HW. gsmmodem [Yes]: N

Camera support: whether the device has a camera.
HW. Camera [No]: N

Maximum horizontal camera pixels
HW. Camera. maxhorizontalpixels [640]:

Maximum vertical camera pixels
HW. Camera. maxverticalpixels [480]:

GPS support: whether there is a GPS in the device.
HW. GPS [Yes]:

Battery support: whether the device can run on a battery.
HW. Battery [Yes]:

Accelerometer: whether there is an accelerometer in the device.
HW. Accelerometer [Yes]:

Audio Recording support: whether the device can record audio
HW. audioinput [Yes]:

Audio Playback support: whether the device can play audio
HW. audiooutput [Yes]:

SD card support: whether the device supports insertion/removal of virtual SD cards.
HW. sdcard [Yes]:

Cache partition support: whether we use a/cache partition on the device.
Disk. cachepartition [Yes]:

Cache partition size
Disk. cachepartition. Size [66 MB]:

Specified acted LCD density: Must be one of 120,160 or 240. A value used to roughly describe the density of the LCD screen for automatic IC resource/asset selection.
HW. LCD. density [160]:

Created AVD 'fs100' Based on Android 1.6, with the following hardware config:
HW. Camera = No
HW. ramsize = 128
HW. touchscreen = Yes
HW. LCD. density = 160
HW. gsmmodem = No
HW. keyboard = No
HW. trackball = No
HW. DPAD = Yes

(4) Create an SD card image on the host

# Sudo./mksdcard 128 M sdcard. img

(5) Start A Virtual Machine

# Sudo./emulator-sdcard./sdcard. IMG @ fs100

3. Install eclipse

(1) http://www.eclipse.org/downloads/packages/release/galileo/r

Download eclipse-sdk-3.5-linux-gtk.tar.gz

Decompress the package to the/home/Linux directory.

(2) Create a working directory

# Mkdir/home/Linux/workspace

(3) Start eclipse

Go to the extract directory of Elipse.
#./Eclipse

Click Help → install new software

(Note: https://dl-ssl.google.com/android/eclipsethe previous time of the network was too busy. I tried it today. If the developer tools cannot be displayed for a long time after the input, you may need to flip the wall. Or download the ADT compressed package and install it by adding archive .)

Click OK and select Developer Tools,

Click Next to complete the ADT installation and restart eclipse.

(4) After the ADT is installed, Select Restart.

The following page is displayed automatically after startup. Or choose windows> Android SDK manager.

You can select the SDK path/home/Linux/Android-SDK.

It can be seen that the 1.6 SDK has been installed. You can also install other sdks for the target platform. The SDK 2.1 is added here.

After the installation is complete, the following information is displayed:

(5) Create a New AVD and support 2.1 (the previous one is 1.6)

Choose Windows> AVD manager.

4. Create a helloword Project

(1) file → new → Project

Select "android", "android Project", and click Next

Name it Hello World

Click Next and select Android 2.1

After finishing, You can edit the project. Use the default code to test.

Click the run button. The following page is displayed in AVD.

Location of the generated APK file in the working directory:

For embedded and 3G related resources and learning, click: Embedded Development Video Android training 3G training QT Development Video Iot training IoT technology video embedded learning

 

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.