Android NDK Environment Setup

Source: Internet
Author: User

Tagged with: and C + + pad roo SSO path lips download Install Targe

Using the latest NDK, direct abandon Cygwin, once do Android projects to use the NDK will need to download the NDK, download install Cygwin (for simulating the Linux environment), download the CDT (Eclipse C + + development plug-in), also configure the compiler, environment variables, Special Trouble, the new version will not need

Steps:

First, The Android website downloads the Android development tool ADT (the abbreviation for Android development tool), which integrates the latest ADT and NDK plugins as well as Eclipse, another latest version number SDK. You can use it after you unzip it.

Second, ADT Plugins: Managing the Android SDK and related development tools

NDK plugin: For the development of Android NDK plug-ins, ADT version number above 20, you can install the NDK plugin. In addition, the NDK integrates the CDT plugin

Download Link interview: http://developer.android.com/sdk/index.html

Third, Download the latest NDK on the Android website, note: The NDK version number has been integrated with Cygwin after R7 and is a very lite version.

Download Link interview: http://developer.android.com/tools/sdk/ndk/index.html


Eclipse configuration:
1. Open Eclipse, point window->preferences->android->ndk, Set the NDK path. For example, Shamoo is E:\android-ndk-r9c



2.



3. This time project will have one more JNI directory. There are android.mk and my-ndk.cpp files under JNI. Android.mk is Ndkproject's makefile,my-ndk.cpp is the source file of the NDK.



4.

5.




6.

Compile the NDK before executing, and then compile the Java code. Compilation may encounter unable to launch Cygpath. is Cygwin on the path? How to solve? For example, the following

7.Right-click Project. The Use default build command is removed from the building settings of Point properties->c/c++ build. Then enter ${ndkroot}/ndk-build.cmd




8. Click on Environment in the C + + build, click Add ... Add environment variable Ndkroot, value for NDK root folder


Android NDK Environment Setup

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.