Setting up Automatic NDK Builds in Eclipse
When editing native JNI code in an Android project using the Android NDK you 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 necessary ndk-build
binary):
Start by right clicking on your android project (named hello-neon in the below screenshots) with JNI resources, and select Properties
. In the resulting dialog, choose the Builders
entry in the list to the left and press the New...
button:
A new dialog will open presenting a list of builder types. Select the Program
type and press the OK
button:
In the Main
tab, fill in the following:
- Name:
- NDK Builder
- Location:
- /opt/android-ndk/ndk-build (or wherever your ndk-build binary is). You may use a variable as in ${system_property:user.home}/lib/android-ndk/ndk-build
- Working Directory:
- ${workspace_loc:/hello-neon} (replace hello-neon with your project name. Press the
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 checkboxes Refresh resources upon completion.
and Recursively include sub-folders
are checked. Choose the Specific resources
radio button and press the Specify
button:
Resources...
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 the Finish
button:
Now skip the Environment
tab and go to the final Build Options
tab. Make sure the Run the builder: During auto builds
checkbox is checked.
Since the NDK build only needs to happen when editing files in the jni
folder, check that folder and press the Finish
button.
Now finally press OK
in the builder configuration dialog - the new NDK builder should now be up and running. Try editing any file in the jni
folder and check that the Console
view produces output from the build process:
在eclipse中配置android ndk的自动编译环境builders的更多相关文章
-
在eclipse里配置Android ndk环境 适用于windows mac 和linux(转)
在eclipse里配置Android ndk环境 适用于windows mac 和linux(转) 2012-02-27 13:02:16| 分类: android | 标签:java prog ...
-
Ubuntu 14.04 x64配置Android 4.4 kitkat编译环境的方法
Ubuntu 14.04 x64配置Android 4.4 kitkat编译环境的方法跟Ubuntu 12.04 - 13.10 以及jellybean编译环境配置没多大区别, 顺便记录下而已: Ub ...
-
Android开发:在Eclipse中配置Android环境
一.文件需要: https://pan.baidu.com/s/1-XCSSPW5JGyPRlvwRVSfmA 提取码:m5t8 NDK过大没有上传在这个文件里. 二.在Eclipse中配置Tools ...
-
eclipse里配置Android ndk环境,用eclipse编译.so文件
做Android NDK开发时,c代码需要用ndk-build来进行编译,而java代码则需要用Android sdk编译. 编译c代码有两种方法: 一.写好c代码后,然后用cygwin搭建ndk-b ...
-
在Ubuntu14.4(32位)中配置I.MX6的QT编译环境
1,开发工具下载 一,下载VMware Workstation虚拟机 地址:http://1.xp510.com:801/xp2011/VMware10.7z 二,下载Ubuntu 14.04.5 L ...
-
Maven学习(一) -- 安装Maven及Eclipse中配置Maven
标签(空格分隔): 学习笔记 本文环境:Windows7, JDK1.7.0_76 安装及配置Maven环境变量 需要电脑中已经有Java环境 在控制台中输入:echo %JAVA_HOME%看是否能 ...
-
在Eclipse中配置Tomcat 创建和运行Servlet/JSP
在Eclipse中配置Tomcat 创建和运行Servlet/JSP 步骤一:在Eclipse中配置Tomcat(注意下载Eclipse IDE for Java EE Developers) (1) ...
-
【Java Web】Eclipse中配置Marven环境
1 Marven简介 Apache Maven,是一个软件(特别是Java软件)项目管理及自动构建工具,由Apache软件基金会所提供.基于项目对象模型(缩写:POM)概念,Maven利用一个*信 ...
-
eclipse中配置spring环境
初识Spring框架 1.简单使用 eclipse中配置Spring环境,如果是初学的话,只需要在eclipse中引入几个jar包就可以用了, 在普通java project项目目录下,建一个lib文 ...
随机推荐
-
1.Struts2简介和Struts2开发环境搭建
一.Struts2简介: 1.什么是Struts2? 著名的SSH三大框架分别为:表现层(Struts).业务逻辑层(Spring),持久化层(Hibernate). Struts2是在WebWork ...
-
Flink DataSet API Programming Guide
https://ci.apache.org/projects/flink/flink-docs-release-0.10/apis/programming_guide.html Example ...
-
baseDao 使用spring3+hibernate3方式
package cn.zk.pic.service.dao; import java.io.Serializable; import java.util.List; import java.util. ...
-
E - Catch That Cow
Description Farmer John has been informed of the location of a fugitive cow and wants to catch her i ...
-
Android SDK教程
Android SDK 网络问题解析 Android 客户端网络不稳定,会导致App 有时候无法及时收到 Push 消息. 很多开发者认为这是因为 JPush 推送不稳定.延迟,甚至有时候认为 JPu ...
-
学习图像算法阶段性总结 (附一键修图Demo)
今天特别感慨.自己从决定研究图像处理.势必要做出一键修图算法. 经历了,三个多月的书籍积累,三个多月的算法调整以及优化. 人是一种奇怪的动物.当你做不到的时候,你以为做到了.自己会感觉非常爽,非常有成 ...
-
[转载]oracle 高水位线详解
一.oracle 高水位线详解 出处: https://www.cnblogs.com/linjiqin/archive/2012/01/15/2323030.html 一.什么是水线(High Wa ...
-
Linux操作系统相关
在工作过程中,如果大家接触的操作系统比较多的话,会发现aix,hpux,CentOS,Redhat命令上都有一定的差异,实则是操作系统内引用的bash(Bourne-Again SHell)不一样,现 ...
-
Phoenix编译支持CDH
作者:Syn良子 出处:http://www.cnblogs.com/cssdongl/p/6898227.html 转载请注明出处 最近由于想调研下低延迟的数据查询框架,那么基于SQL on Hba ...
-
linux系统命令行基本组成元素
一.shell prompt(PS1) 命令行提示符 1. 游标(coursor) 当你成功登录进一个文字界面之后,大部份情形下,你会在荧幕上看到一个不断闪烁的方块或底线(视不同版本而别),我们称之为 ...