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