# 在Eclipse下使用C/C++ （JNI）最简单的方式

1267人阅读 评论(0)

NDK 下载：
http://developer.android.com/sdk/ndk/index.html

NDK的使用也很简单。我把它分为两步。

Here's the general outline of how you work with the NDK tools:

1. Place your native sources under <project>/jni/...
2. Create <project>/jni/Android.mk to describe your native sources to the NDK build system
3. Optional: Create <project>/jni/Application.mk.
4. Build your native code by running the 'ndk-build' script from your project's directory. It is located in the top-level NDK directory:
cd <project>
<ndk>/ndk-build


The build tools copy the stripped, shared libraries needed by your application to the proper location in the application's project directory.

5. Finally, compile your application using the SDK tools in the usual way. The SDK build tools will package the shared libraries in the application's deployable .apk file.

For complete information on all of the steps listed above, please see the documentation included with the NDK package.

0
0

* 以上用户言论只代表其个人观点，不代表CSDN网站的观点或立场
个人资料
• 访问：621576次
• 积分：7529
• 等级：
• 排名：第2855名
• 原创：91篇
• 转载：106篇
• 译文：0篇
• 评论：258条
新书上市，让大家久等了~
讨论/学习

QQ群(专注于Android系统的分析与讨论)组： 188145016

Email: xuesenlin1@gmail.com

博客专栏
 Thinking In Android 文章：29篇 阅读：311986
文章分类
最新评论