Android ndk Development Environment configuration in WINXP

Source: Internet
Author: User
Tags android sdk manager

Android ndk Development Environment configuration in WINXP

If you already have the Android (Java) development environment, skip the first two steps.

1. install Java JDK

First of all, download Java JDK, this article uses JDK 1.6, official: JDK 1.6 official download _ JDK 6 official: http://www.java.net/download. Next, open and install Java JDK. Generally, install JDK to c: \ jdk.1.6. Two Java-related folders (C: \ jdk1.6.0 and c: \ jre1.6.0) will appear on drive c: \ jdk1.6. Once again, configure the Java development environment. This step does not aim to add javac and Java commands to the system, that is, when you enter Java in your DOS window, you will not be prompted to find the command, if you enter javac, you will not be prompted to find the command. Therefore, we need to add c: \ jdk1.6.0 \ bin; to the system environment variable, right-click my computer-> properties-> advanced-> environment variables, and select path in the system variables to edit. c: \ JDK \ 1.6.0 \ bin; after the existing characters are added, note that each path is separated by commas (,). In this case, Enter cmd in the run and Java and javac in the DOS terminal. The system does not prompt that the name is not found, the following information is printed, indicating that the Java environment variable is correctly configured. Finally, configure the classpath path .; % java_home % \ Lib; % java_home % \ Lib \ tools. jar; % java_home % \ Lib \ DT. jar; % jre_home % \ Lib \ RT. J Ar; % java_jre_home % \ Lib \ RT. in jar, you need to create three new variable names and corresponding paths in the system variable. The method is to open the system variable interface, click-> New: enter the name and corresponding value. References: http://www.doc88.com/p-397948140678.htmlhttp://blog.csdn.net/luoweifu/article/details/6789595http://aben328.iteye.com/blog/341499

 

Now, the Java JDK environment configuration is complete. Let's take a look at Step 2:

 

2. Install android_sdk and eclipse and configure the android development environment. It is very easy. If you are willing to spend 10 minutes studying this process, you will benefit a lot.

First, download the latest Win32 platform SDK from Android.

Http://developer.android.com/sdk/index.html#download. the latest Android SDK has been integrated with eclipse. You do not need to download the update plug-in, update the ADT, and configure the SDK path.

Select the corresponding version based on the operating system length and decompress it to E: \ Android-SDK \. This path is the path of my local computer. You can place it anywhere, however, the root directory of the disk is recommended.

Second, configure the androidsdk environment variables, open the system environment variables interface, select path to edit; % android_sdk_home % \ platform-tools Add the PATH value, pay attention to use; separate each path.

Add the android_sdk_home variable to the system variable and set the path of E: \ Android-SDK \ adt-bundle-windows-x86 \ SDK to the value of this variable. Enter ADB in DOS. If no error message is displayed, the configuration is correct. This step is to use the ADB command in the system and many tools in Android development.

Again, open eclipse, path is E: \ Android-SDK \ adt-bundle-windows-x86 \ eclipse, that is, you extract androidsdk directory, the same as the SDK eclipse directory. Let's install some Android APIs. Click "windows in Eclipse" and click "android SDK manager" to install or update some APIs. We recommend that you install 2.2, 2.3.x, and 4.0.x as needed, both Android SDK tools and Android must be installed.
SDK platform-tools.

After the installation is complete, let's create a new simulator. Click windows-> Android Virtual Devices manager. The default version of Android already exists. (This is the latest SDK ), click "new", select "Install android", create a simulation, and enter the name, size, screen resolution, and other configurations.

You can create an android project here. In eclipse, click File> new project and select the first project under the android folder.

Enter the package name and master acitivity name as prompted. After the creation is complete, select the project, click Run, select Android Application, click OK, select the simulator, and wait.

 

There will be a hellow world! Interface.

By now, the android development environment under Win has been configured. It may take more than 10 minutes for you, but does it actually sound amazing?

Next, see Steps 3 and 4. Actually it's not as difficult as you think, right?

 

3. Download and install ndk

This is more simple, the current official version of the ndk is r8d, now let us use the latest ndk to complete the ndk configuration, this is: http://developer.android.com/tools/sdk/ndk/index.html

Select the Windows version, download and unzip to the disk root directory, the final ndk path is similar to F: \ android-ndk-r8d-windows \ android-ndk-r8d

 

4. Download and install cygwin and configure the association between cygwin and ndk.

First, download the online installation program setup.exe of cygwin.

Cygwin: http://cygwin.com/setup.exe

Next, double-click to open it, click Next, and select online installation. If the network speed is poor, click Next to select the cygwin installation directory.

In the next step, select the download directory and click Next. You only need to install the GCC and make tools. Go to the search page, enter make in the search box, change default to install, and click Next, after installation, return the command to install GCC,

After the installation is complete, go to the cygwin installation directory and modify the PATH value in the profile of etc. Path = "/usr/local/bin:/usr/bin: $ {path} ", add the ndk path to the path and change it to something similar:

Path = "/usr/local/bin:/usr/bin:/cygdrive/f/android-ndk-r8d-windows/android-ndk-r8d: $ {path }"

Then open cygwin, go to the F: \ android-ndk-r8d-windows \ android-ndk-r8d \ sample \ hello-JNI directory through CD, enter :. /ndk-build. If it is correct, it will be compiled successfully. so file.

Finally, open eclipse, import the hello-JNI project to eclipse, and run it.

References:

Http://blog.csdn.net/com360/article/details/8179130

 

 

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.