Showing posts with label android NDK. Show all posts
Showing posts with label android NDK. Show all posts
2010/05/21
Android NDK, Revision 4 공개
Android Froyo 공개와 발 맞추어 NDK 도 업그레이드 된 버전이 공개가 되었다. Froyo API 를 지원 한다.
Android NDK, Revision 4 (May 2010)
<
Original Post : http://neodreamer-dev.tistory.com/443
Android NDK, Revision 4 (May 2010)
- Provides a simplified build system through the new ndk-build build command.
- Adds support for easy native debugging of generated machine code on production devices through the new ndk-gdb command.
- Adds a new Android-specific ABI for ARM-based CPU architectures, armeabi-v7a. The new ABI extends the existing armeabi ABI to include these CPU instruction set extensions:
- Thumb-2 instructions
- VFP hardware FPU instructions (VFPv3-D16)
- Optional support for ARM Advanced SIMD (NEON) GCC intrinsics and VFPv3-D32. Supported by devices such as Verizon Droid by Motorola, Google Nexus One, and others.
- Adds a new cpufeatures static library (with sources) that lets your app detect the host device's CPU features at runtime. Specifically, applications can check for ARMv7-A support, as well as VFPv3-D32 and NEON support, then provide separate code paths as needed.
- Adds a sample application, hello-neon, that illustrates how to use the cpufeatures library to check CPU features and then provide an optimized code path using NEON instrinsics, if supported by the CPU.
- Lets you generate machine code for either or both of the instruction sets supported by the NDK. For example, you can build for both ARMv5 and ARMv7-A architectures at the same time and have everything stored to your application's final .apk.
- To ensure that your applications are available to users only if their devices are capable of running them, Android Market now filters applications based on the instruction set information included in your application — no action is needed on your part to enable the filtering. Additionally, the Android system itself also checks your application at install time and allows the installation to continue only if the application provides a library that is compiled for the device's CPU architecture.
- Adds support for Android 2.2, including a new stable API for accessing the pixel buffers of Bitmap objects from native code.
<
Original Post : http://neodreamer-dev.tistory.com/443
Labels:
Android
,
Android Development
,
android NDK
,
TistoryOldPost
,
안드로이드
,
안드로이드 개발
2010/01/28
Eclipse 에서 빌드할 때 NDK 이용한 소스 컴파일 하기
프로젝트의 오른쪽 팝업 메뉴의 Properties 를 선택하고 왼쪽 패널의 Builders 를 선택한다.

Builders 내용중 "New..."를 선택하고 Program 을 선택한다.

이름으로 "Native Builder"를 입력하고 위치는 cygwin 의 bash.exe 경로를 입력하고 Working Directory를 cygwin 의 bin 폴더로 지정한다. 그리고 Arguments 에 로그인 정보와 ndk 위치로 이동하여 프로젝트를 빌드하도록 한다.

Refresh 탭으로 이동하여 "Refresh resources upon completion"를 선택하고 "Specific resources"를 선택한다. 그리고 "Specify Resources..." 버튼을 선택하여 프로젝트의 lib 폴더를 선택하고 찾을 닫고, 다시 Refresh 탭의 "Recursively iclude sub-folders"를 선택한다.


Build Options 으로 이동하여 "Allocate Consol"을 선택하고 "Launch in background"를 선택한다. NDK 가 수행되는 내용을 확인하려면 체크하지 않아도 된다.
그리고 "After a Clean", "During manual builds", "During auto builds" 를 선택한다.
"Specify working set of relevant resources"를 선택하고, 바로 옆에 있는 "Specify Resources..." 버튼을 클릭하여 jni 경로와 포함된 파일들을 선택한다.


그리고 OK를 눌러 작업을 마치면 Native Builder 가 추가된 것을 확인할 수 있다.

이제 Eclipse 에서 실행이나 빌드를 하면 포함된 NDK 라이브러리도 함께 빌드가 된다.
소스 출처 : Get Your Eclipse-Integrated NDK On!<
Original Post : http://neodreamer-dev.tistory.com/365
Builders 내용중 "New..."를 선택하고 Program 을 선택한다.
이름으로 "Native Builder"를 입력하고 위치는 cygwin 의 bash.exe 경로를 입력하고 Working Directory를 cygwin 의 bin 폴더로 지정한다. 그리고 Arguments 에 로그인 정보와 ndk 위치로 이동하여 프로젝트를 빌드하도록 한다.
- --login -c "cd ~/android_ndk && make=hello-jni"
Refresh 탭으로 이동하여 "Refresh resources upon completion"를 선택하고 "Specific resources"를 선택한다. 그리고 "Specify Resources..." 버튼을 선택하여 프로젝트의 lib 폴더를 선택하고 찾을 닫고, 다시 Refresh 탭의 "Recursively iclude sub-folders"를 선택한다.
Build Options 으로 이동하여 "Allocate Consol"을 선택하고 "Launch in background"를 선택한다. NDK 가 수행되는 내용을 확인하려면 체크하지 않아도 된다.
그리고 "After a Clean", "During manual builds", "During auto builds" 를 선택한다.
"Specify working set of relevant resources"를 선택하고, 바로 옆에 있는 "Specify Resources..." 버튼을 클릭하여 jni 경로와 포함된 파일들을 선택한다.
그리고 OK를 눌러 작업을 마치면 Native Builder 가 추가된 것을 확인할 수 있다.
이제 Eclipse 에서 실행이나 빌드를 하면 포함된 NDK 라이브러리도 함께 빌드가 된다.
소스 출처 : Get Your Eclipse-Integrated NDK On!<
Original Post : http://neodreamer-dev.tistory.com/365
Labels:
Android
,
Android C/C++
,
Android Development
,
android NDK
,
NDK 개발환경
,
TistoryOldPost
,
안드로이드
Android NDK 를 이용한 C/C++ 안드로이드 프로그래밍 Hello JNI
Eclipse 에 SDK를 이용한 개발 환경이 갖추어 진 상태에서 아래 작업을 수행한다.
2009/12/19 - [Dev Story/Android] - 안드로이드 개발 환경 만들기 (윈도우즈 기반)
먼저 최신 NDK를 다운 받아 적당한 위치에 압축을 풀어 놓는다.( android-ndk-1.6_r1-windows.zip )
압축 해제 위치 : D:\Dev\android-ndk-1.6_r1
그리고 나서 Cygwin 을 설치한다. 2010/01/08 - [Dev Story] - Cygwin 설치하기
Cygwin 을 설치할 때 아래 패키지를 설치한다.
이제 Cygwin 을 실행한다. (시작메뉴의 "Cygwin Bash Shell" 를 실행시키면 된다.)
Bash Shell 에서 ndk 의 압축 해제 폴더로 이동을 한다.
Cygwin 은 가상의 리눅스로 실제 물리적인 드라이브를 접근 하려면 /cygdrive 아래의 드라이브 경로를 이용하면 된다.
접근은 보다 용의하게 하기 위해 실제 NDK 위치를 home 디렉토리에 심볼릭 링크를 걸어서 작업을 했다. home 디렉토리에서 아래의 명령을 수행하면 된다.
NDK root 로 이동을 하여 아래 명령어로 NDK를 설치한다.
NDK 의 예제 프로젝트 중 Hello-jni 를 빌드한다.
이제 Eclipse를 실행하여 Android 프로젝트를 생성한다. 이때 Create project from existing source 를 선택하고 위치를 NDK Home\apps\hello-jni\project 를 지정한다.

Finish로 프로젝트를 생성한다. 만약 에러가 있다면 아래글을 참고하여 해결한다.
2009/12/22 - [Dev Story/Android] - Project 'xxx' is missing required source folder: 'gen' 해결하기
이제 프로젝트를 실행 시킨다.

Android 에뮬레이터가 동작중이 아니라면 부팅시간이 좀 오래 걸린다. 부팅이 끝나면 Hello jni 프로그램이 실행된 모습을 볼 수 있다.

<
Original Post : http://neodreamer-dev.tistory.com/364
2009/12/19 - [Dev Story/Android] - 안드로이드 개발 환경 만들기 (윈도우즈 기반)
먼저 최신 NDK를 다운 받아 적당한 위치에 압축을 풀어 놓는다.( android-ndk-1.6_r1-windows.zip )
압축 해제 위치 : D:\Dev\android-ndk-1.6_r1
그리고 나서 Cygwin 을 설치한다. 2010/01/08 - [Dev Story] - Cygwin 설치하기
Cygwin 을 설치할 때 아래 패키지를 설치한다.
- devel/gcc-core
- devel/gcc-c++
- devel/make
- editor/vim (옵션 - 혹시 모를 작업을 위해)
이제 Cygwin 을 실행한다. (시작메뉴의 "Cygwin Bash Shell" 를 실행시키면 된다.)
Bash Shell 에서 ndk 의 압축 해제 폴더로 이동을 한다.
Cygwin 은 가상의 리눅스로 실제 물리적인 드라이브를 접근 하려면 /cygdrive 아래의 드라이브 경로를 이용하면 된다.
접근은 보다 용의하게 하기 위해 실제 NDK 위치를 home 디렉토리에 심볼릭 링크를 걸어서 작업을 했다. home 디렉토리에서 아래의 명령을 수행하면 된다.
- ln -s /cygdrive/D/Dev/android-ndk-1.6_r1/ android-ndk
NDK root 로 이동을 하여 아래 명령어로 NDK를 설치한다.
- ./build/host-setup.sh
NDK 의 예제 프로젝트 중 Hello-jni 를 빌드한다.
- make APP=hello-jni
이제 Eclipse를 실행하여 Android 프로젝트를 생성한다. 이때 Create project from existing source 를 선택하고 위치를 NDK Home\apps\hello-jni\project 를 지정한다.
Finish로 프로젝트를 생성한다. 만약 에러가 있다면 아래글을 참고하여 해결한다.
2009/12/22 - [Dev Story/Android] - Project 'xxx' is missing required source folder: 'gen' 해결하기
이제 프로젝트를 실행 시킨다.
Android 에뮬레이터가 동작중이 아니라면 부팅시간이 좀 오래 걸린다. 부팅이 끝나면 Hello jni 프로그램이 실행된 모습을 볼 수 있다.
<
Original Post : http://neodreamer-dev.tistory.com/364
Labels:
Android
,
Android C/C++
,
Android Development
,
android NDK
,
TistoryOldPost
,
안드로이드 NDK
,
안드로이드 개발
Subscribe to:
Posts
(
Atom
)