Three ways to automatically compile Ndk/jni "Android" Eclipse
Skyseraph Sep. 18th 2014
Email:[email protected]
First, Eclipse Association Cygwin
1. Right click on the project , select properties-> Select Builders, Select New in Builders to create a Program
2. Parameter configuration
TwoEclipse Association ndk-build (self-built builder method)
1. project->properties->builders->new, create a new Builder
2. parameter Configuration
2.1 Main
①name:ndk_builder
②location is the path to Ndk-build.cmd, can be an absolute path, or it can be in the form of an environment variable, that is, ${android_ndk}\ndk-build.cmd, where ANDROID_NDK is a configured NDK path
③working Directory, for the current project.
Here the expression of ${} is using the EC environment variable, can use the variables ... button to find some 3 EC environment variables.
For the configuration on Linux, just like the configuration here, simply change the address of location to Ndk-build.
2.2 Refresh
2.3 Build Options
Note: In a Linux environment, you only need to modify the ndk-build. cmd to ndk-build
iii.Eclipse associated ndk-build (using the CDT method)
1. Pre-Preparation : Eclipse environment +android Environment +eclipse C + + Environment
2. write Android Java/jni code, refer to OpenCV instance 1
3. Convert an Android project to a C + + project (which has C + + properties), e.g., convert to a C + + C + +, New.
4. Configure the NDK compilation path, Project->properties, where Build-command ANDROID_NDK is configured in the environment variable ANDROID-NDK path;build-directory is the current project directory
5. Configure the Engineering properties,Project->properties, for example, inThis example, OpenCV, where CNU C and GNU C + + are configured OpenCV 's link library
========
by SkySeraph-2014
SYNC Skyseraph CSDN
Three ways to automatically compile Ndk/jni "Android" eclipse