-
by 봄빛
- 2011/12/27 20:42
- fussion.egloos.com/10825180
-
덧글수 : 0
- 용어 설명
- JNI (Java Native Interface)
- NDK (Native Development Kit)
- 프로그램 준비
- NDK (Native Development Kit)
- Android NDK, r7
- File Name : android-ndk-r7-windows.zip
- Site : http://developer.android.com
- Direct Link :
http://developer.android.com/sdk/ndk/index.html
- Cygwin
- Cygwin 1.7.9-1
- File Name : setup.exe
- Site : http://cygwin.com
- Direct Link : http://cygwin.com/setup.exe
- 프로그램 설치
- NDK (Native Development Kit)
- android-ndk-r7-windows.zip 압축해제
- 설치 경로 : C:\Tools\Android\android-ndk-r7 (경로명에 공백 없어야 함.)
- 설정 (환경 변수)
- ANDROID_NDK : C:\Tools\Android\android-ndk-r7
- PATH : %ANDROID_NDK%;~~~
- 설치 확인 : Cygwin 설치 후 확인
- Cygwin
- setup.exe 실행
- 설치 경로 : C:\cygwin
- 선택 옵션 : Devel category : gcc, make 항목 설치
- 설치 확인
- Cygwin bash shell 실행
- .bashrc 편집
- export ANDROID_NDK_ROOT = path
- export PATH=$PATH:path
- ln -s path android_ndk
- $ ndk-build 실행
- Sample Code 구동
- Import hello-jni
- Java source build (Class 파일 확인)
- header file 생성 및 이동
$ cd ./bin
$ javah com.example.hellojni.HelloJni
$ mv com_example_hellojni_HelloJni.h ../src - header file include
#include "com_example_hellojni_HelloJni.h" - c source build
$ ndk-build - Run Application
- Reference
- JNI 개념
http://atin.tistory.com/347 - NDK 설치
http://blog.naver.com/dizmahs?Redirect=Log&logNo=110087452000
포스트 메타 정보
트랙백
이 글과 관련된 글 쓰기 (트랙백 보내기)
TrackbackURL : http://fussion.egloos.com/tb/10825180 [
도움말]

덧글