没有合适的资源?快使用搜索试试~ 我知道了~
在Windows下使用Eclipse及Sequoyah开发Android JNI项目工程
3星 · 超过75%的资源 需积分: 9 14 下载量 47 浏览量
2013-07-01
09:51:10
上传
评论
收藏 42.84MB DOC 举报
温馨提示
试读
16页
在Windows下使用Eclipse及Sequoyah开发Android JNI项目工程
资源推荐
资源详情
资源评论
一、搭建 Android 开发环境
...
二、搭建 JNI 开发环境
1、工具准备
a、CDT 插件(c/c++编辑器及工具)
b、Sequoyah 插件(Android 项目增加 c/c++ nature)
2、工程配置
a、增加 native 支持
b、修改编译器路径 bash c:ndroid-ndk-r5cdk-build
c、编译项目
done.
基本思路 在项目 Builders 中,增加 CDT Builder 编译 JNI 代码。
原始的 Android 工程 Builders 中,没有 CDT!Builder 一项。
!
What is JNI? !JNI is a set of specifications/framework that allows Java code to call C/C++ native code. !In Android world, JNI is
supported through the!Android NDK . You still need to use Java to call the Native Interfaces, but you can code most of you app
in C. !
Why use JNI? !I can think of two obvious answers:
1. Execution speed (Java is almost always slower than C and it is easier to optimize C code than Java code). !
2. Porting from a large C/C++ code-base (for code reusability and to save time).
Most NDI techniques requires the use of command-line and some sort of Linux shell. !Luckily as Android matures, there are
several plug-ins that simplifies this. !The one thing that I really!dreaded was using command-lines every time I have to recompile
the C code, so I had stayed away from the NDK for a while. !But if you are brave enough here’s a link to the
documentation:!http://developer. android .com/sdk/ndk/overview.html .
This guide assumes that you have already have a basic!Android SDK !set-up and you know how to compile and run the regular
sample projects, as well!as creating basic projects.
Let me warn beforehand you that getting the NDK to work is still a complicated and can be very frustrating — many things can
go wrong in different parts. !There is not a single package which allows you to just sit back and install just one thing.
You!need to install !a lot of components, change paths, change settings, and more. !Further complexity added by!many
different Eclipse versions and configurations, conflicting plug-ins, missing prerequisted plug-ins, etc.
I recommend starting out with a fresh Eclipse install to avoid additional headache altogether.
Setting Up The Development Environment
1. Install Eclipse
I am using Eclipse!Indigo!for this guide. !I’m running Windows 7. Here’s the Eclipse About box in case you need it for reference:
Eclipse SDK
Version: 3.7.0
Build id: I20110613-1736
(c) Copyright Eclipse contributors and others 2000, 2011. !All rights reserved.
Visit http://www.eclipse.org/platform
This product includes software developed by the
Apache Software Foundation http://www.apache.org/
Here’s the download link that I use:!http://download.eclipse.org/eclipse/downloads/drops/R-3.7-201106131736/
winPlatform.php#EclipseSDK.
2. Install Eclipse C/C++ Development Tools
After Eclipse is installed, run it and go to the menu->Help->Install New Software. !Select the Indigo or CDT update site.
SelectProgramming Languages!and select/check!C/C++ Development Tools
By Category!checkbox (can be seen in the bottom half of the picture below) to see the available components and then just
select them all (I am not sure which one is really needed, but I didn’t want really care since there’s no harm installing all).
Once you have Sequoyah installed, I recommend checking out the Sequoyah User Guide section in the Eclipse Help menu at
some point because it contains some useful information, some which helped me throughout the way of getting the process
剩余15页未读,继续阅读
资源评论
- 小达哥2014-05-19很好,带来很大的帮助,谢谢
- PaulYoung_Blog2013-12-27新版本的插件已经配有该插件了
fllow_me
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- ZArchiver.Pro_0.9.5.apk
- vmware环境配置.mp4
- 548springboot + vue 大学生社团活动平台.zip(可运行源码+数据库文件+文档)
- 微信小程序 辩论倒计时小程序源码 作业设计demo 计算机专业参考
- 深入探究文件IO,嵌入式Linux
- 微信备忘录小程序源码 作业设计demo 计算机专业作业
- 微信小程序 仿百度小说小程序 看小说小程序 实现源码
- 锂电资料包-锂离子电池技术干货资料合集.zip
- EMC EMI资料大全电磁兼容电磁干扰设计资料工程师必备经验资料35个合集.zip
- 547springboot + vue 交流互动系统.zip(可运行源码+数据库文件+文档)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功