http://developer.android.com/reference/android/app/NativeActivity.html
http://stackoverflow.com/questions/4372899/android-nativeactivity
Getting Started with the NDK
Once you've installed the NDK successfully, take a few minutes to read the documentation included in the NDK. You can find the documentation in the <ndk>/docs/
directory. In particular, please read the OVERVIEW.HTML document completely, so that you understand the intent of the NDK and how to use it.
If you used a previous version of the NDK, take a moment to review the list of NDK changes in the CHANGES.HTML document.
Here's the general outline of how you work with the NDK tools:
- Place your native sources under
<project>/jni/...
- Create
<project>/jni/Android.mk
to describe your native sources to the NDK build system - Optional: Create
<project>/jni/Application.mk
. - 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.
- 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.
'Programming Android' 카테고리의 다른 글
(Android) Sample - MultiResolution (0) | 2012.06.24 |
---|---|
(Android) NDK 1.6 R1을 이용하여 C/C++로 작성된 고전 3D 게임 포팅하기 (0) | 2012.06.23 |
(Android) Setting up a Device for Development (0) | 2012.06.21 |
OpenAL on Android (0) | 2012.06.20 |
Android development (0) | 2012.06.18 |