Android Deep Explore (Vol. 1) Hal with Driver Development Learning notes (2)

Source: Internet
Author: User

Android Deep Explore (Vol. 1) Hal with Driver Development Learning Notes (2)

Chapter II Building an Android development environment

Two types of JDK installation methods are described in the book.

Method One:

Download the JDK from the official website and configure it, after extracting it, open the profile file in the terminal to set the PATH environment variable (# Soure/etc/profile), open the profile file and enter the following content

Export path=.:d Eveloper/jdk6/bin: $PATH

After you save the profile file, there are two ways to reload the profile file.

1.# Sourse/etc/profile

2.#. /etc/profile

The second method is more convenient to perform the following command under Linux terminal to install JDK6 automatically.

# add-apt-repository "Deb http://archive.cannonical.com/ Lucid Partner

# Apt-get Update

# Apt-get Install SUN-JAVA6-JDK

This method does not need to be configured for path.

Next is the installation of the Android SDK, download the Linux version of the Android SDK file, in the Linux file system to extract it, the current directory will appear in the Android-sdk-linux directory, in this directory run file name Android Script file, display the Android SDK installation interface, install as needed, because/platform-tools and/tools in the Android SDK installation directory contain many common tools, so it is best to add to the environment variable. The code is as follows

# Gedit/etc/profile

#export android_sdk_path= (Installation address for ANDROID SDK)

#export path= $ANDROID _sdk_path/platform-tools$path

#sourse/etc/profile

Install eclipse successfully after installing ADT, launch Eclipse, click Help>install New Software menu item, the Install dialog box will appear.

After clicking OK, you can automatically search and developer tools, expand the list, select the Android DDMS Android development tools option, and then click Next->next->accept.....-> Next->finish wait for installation.

Next, configure the ADK windows>preferences

Open the Android Virtual Device Manager to create the AVD.

Next install the Android NDK and go to the download page to download the Linux version of the NDK,

and unzip it and add the Ndk-build file in the directory to the path.

In order to develop the Android application and the Android NDK program in Eclipse, you need to install the CDT (plug-in for developing a/C + + program).

Using a feature provided by Eclipse, you can automatically invoke the command to compile the NDK program before compiling the build APK file, configured as follows: Properties>builders>new>choose configuration type >program Click OK and then enter the appropriate content in the Edit Configuration dialog box, change the main page to configure refresh and build option, and in refresh specify Resources Select the directory to refresh and select the Lib directory, then go to build option and click Specify Resources to select the JNI directory. The setting is complete.

Configure the cross-compilation environment or direct download using the already configured cross-compilation environment.

Android Deep Explore (Vol. 1) Hal with Driver Development Learning notes (2)

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.