When editing native JNI code in an Android project using theAndroid NDKyou may configure Eclipse to automatically rebuild your project when editing native code, just
as it does for java. The below steps shows how to perform the necessary configuration (note that this requires revision 4 or later of the NDK - previous revisions does not contain the necessaryndk-build
binary):
Start by right clicking on your android project (namedhello-neonin the below screenshots) with JNI resources, and selectProperties
. In the resulting dialog, choose theBuilders
entry in the list to the left and press theNew...
button:
A new dialog will open presenting a list of builder types. Select theProgram
type and press theOK
button:
In theMain
tab, fill in the following:
Browse Workspace...
button to select it graphically)The result should look something like the below:
Now continue with the refresh tab. Make sure the two checkboxesRefresh resources upon completion.
andRecursively include sub-folders
are checked. Choose theSpecific resources
radio button and press theSpecify
Resources...
button:
Since the ndk-build process will generate files in the lib folder, we want Eclipse to discover changes made there without having to refresh manually. So select the lib folder in the project (create one if necessary) and press theFinish
button:
Now skip theEnvironment
tab and go to the finalBuild Options
tab. Make sure theRun the builder: During auto builds
checkbox is checked.
Since the NDK build only needs to happen when editing files in thejni
folder, check that folder and press theFinish
button.
Now finally pressOK
in the builder configuration dialog - the new NDK builder should now be up and running. Try editing any file in thejni
folder and check that theConsole
view produces output from the build process:
相关推荐
详细介绍了在eclipse中android项目下c/c++代码的自动编译,和在eclipse中用ant生成ndk需要的jni头文件,加速ndk的开发,因为是原创,费了不少心力和时间,所以设了6分,有人反映太贵了,现在调成3分,这下大家满意了...
Windows下Eclipse搭建Android_NDK开发环境
Eclipse集成Android NDK说明 1 2 为什么要用NDK? 2 3 为什么要集成? 2 4 怎样操作? 2 4.1 预备条件 2 4.1.1 Cygwin 2 4.1.2 Eclipse 2 4.1.3 Eclipse CDT 3 4.1.4 Android SDK 3 4.1.5 Android NDK 3 ...
windows下androidNDK环境配置
该资源教程,是在eclipse下实现的androidndk开发的文档,简单易懂,手把手教程!
在Android下用C/C++开发,新版本的配置不需要cygwin
NDK提供了一系列的工具,帮助开发者快速开发C(或C++)的动态库,并能自动将so和java应用一起打包成apk,并集成了交叉编译器,并提供了相应的mk文件隔离CPU、平台、ABI等差异,开发人员只需要简单修改mk文件
android开发有时需要开发c/c++插件,这就需要用到NDK(Native Development Kit),如果eclipse中没有配置NDK的选项则需要此插件。解压后对应放入eclipse目录下的features和plugins文件夹重启eclipse就可以看到NDK的...
android开发NDK时,如何正确在Eclipse配置NDK环境,并且提供一些常见文件的解决办法
Eclipse配置NDK开发环境
下载 https://developer.android.google.cn/ndk/downloads/ ...编译ffmpeg:最高版本16b,再高的版本编译出错。...unzip android-ndk-r16b-linux-x86_64.zip 配置 export NDK=/home/quantum6/android-ndk-16b
android-ndk(android-ndk-r25b-linux.zip)适用于Linux系统
解决eclipse无NDK选项设置问题,复制下载文件到eclipse目录的“plugins”下面。如我的复制到"\eclipse\plugins\com.android.ide.eclipse.ndk_23.0.2.1259578.jar"。
android-ndk(android-ndk-r26b-windows.zip)适用于Windows系统
介绍了linux环境下 android NDK开发配置过程
android-ndk(android-ndk-r25b-windows.zip)适用于Windows系统
windows下eclipse集成cygwin编译android_NDK.doc
Eclipse下安装Android开发环境NDK和CDT.doc