最終更新:2021-11-09 (火) 11:48:31 (861d)
Android NDK
Top / Android NDK
Android Native Development Tools
http://developer.android.com/tools/sdk/ndk/index.html
ガイド
- https://developer.android.com/ndk/guides?hl=ja
- https://developer.android.com/studio/projects/add-native-code.html
ダウンロード
Android NDK/バージョン
Android NDK/サンプル
Android Studio 2.2
- Android Studio's default build tool for native libraries is CMake.
- Android Studio also supports ndk-build due to the large number of existing projects that use the build toolkit to compile their native code.
Android Studioからインストール
- %LOCALAPPDATA%\Android\sdk\ndk-bundleに入る
中身
Development tools
The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that can generate native ARM binaries on Linux,Mac OS X, and Windows (with Cygwin) platforms.
It provides a set of system headers for stable native APIs that are guaranteed to be supported in all later releases of the platform:
- libc (C library) headers
- libm (math library) headers
- JNI interface headers
- libz? (Zlib compression) headers
- liblog? (Android logging) header
- OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers
- libjnigraphics (Pixel buffer access) header (for Android 2.2 and above).
- A Minimal set of headers for C++ support
- OpenSL ES native audio libraries
- Android native application APIS
アーキテクチャ
Native Code CPU Architecture Used Compatible Android Platform(s) ARM, ARM-NEON Android 1.5 (API Level 3) and higher x86 Android 2.3 (API Level 9) and higher MIPS Android 2.3 (API Level 9) and higher
- ARMv5TE, including Thumb-1? instructions
- ARMv7-A, including Thumb-2 and VFPv3-D16 instructions, with optional support for NEON/VFPv3-D32? instructions
MIPS
提供されるライブラリ
必要なライブラリとか
- Android SDK (Android 1.5以降)
- GNU make 3.81以降
- awk
- Cygwin 1.7以降 (Windows)->特に要らないっぽい
使い方
インストール方法
- ダウンロードして展開。
ドキュメント
- doc/OVERVIEW.HTMLをひと通り読むようにとのこと。
Makefile
メモ
要らなくなった作業
- Previous releases required you to run the 'build/host-setup.sh' script to configure the NDK. However, this step has been removed in release 4 (a.k.a. r4).
Android NDK/開発
Android NDK/ディレクトリ構成
Android Studio/NDK
- Android Studio上でのNDKサポートについて現在のところGoogleからのアナウンスはありません。
- http://samuraism.com/2013/05/17/882
- As of Jan 2015 the NDK support for Android studio is still unusable. A cryptic message says: "Alternative will be provided in the future."
- Version 0.7+: They suggested to still use ndk-build / ant
- Version 0.8+: They've introduced a minimal NDK support
- Version 1.0.0: It looked like NDK support was going to be official
- Version 1.0.2: It now looks like NDK support is deprecated.