NDK Learning One: Environment builds Eclipse chapter

Source: Internet
Author: User

Download NDKA mirror site in the domestic download speed is relatively fast http://wear.techbrood.com/tools/sdk/ndk/#Installing
There are many 1 scenarios for setting up an environment online. Eclipse + ADT + NDK 2. Androidstudio + NDK3. VS + NDK4. VS + visualgdb (can be used after installation, VISUALGDB charge) 5. Editor (e.g. Sublime) + NDK
However, before setting up the above environment, we will first configure the Ndk_root.
Configure Ndk_root

Add environment variable Ndk_root to: E:\Android\android-ndk-r10b

Added under environment variable PATH:%ndk_root%;


When the environment variable is configured, enter Ndk_build in the CMD directory to display the relevant message using the Ndk_build + editor + makefile You can start developing

Eclipse Environment Setup1. Set the NDK path

Android Tools->add Native Support


At this time the project will be more than one Jni folder, JNI under the Android.mk and My-ndk.cpp files. ANDROID.MK is the NDK project Makefile,my-ndk.cpp is the NDK source files this time can be imported from the NDK Samples directory hello_jni import source code to compile, remember is copy to the current project directory

eclipse highlighting, smart tips questions:The first time not smart tips, this time to run the project, there is a highlight and smart tips
Configure includeSometimes you have to add some libraries or header files to the directory: Eclipse right-click Project Properties->c++ general-> Paths and Symbols:

E:\android\android-ndk-r10b\platforms\android-19\arch-arm\usr\includee:\android\android-ndk-r10b\sources\ Cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\includee:\android\android-ndk-r10b\sources\cxx-stl\gnu-libstdc++\ 4.6\include






From for notes (Wiz)

NDK Learning One: Environment building Eclipse article

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.