From Surf Wiki (app.surf) — the open knowledge base
Android NDK
Software development kit
Software development kit
| Field | Value | |
|---|---|---|
| title | Android NDK | |
| logo | ||
| screenshot | ||
| developer | ||
| released | ||
| latest release version | ||
| latest release date | ||
| programming language | C and C++ | |
| operating system | {{Plainlist | |
| platform | IA-32 (Windows only) or x86-64 (Windows, macOS and Linux) | |
| language | English | |
| genre | SDK | |
| website |
- Windows Vista and later
- OS X 10.10 and later
- Linux The Android Native Development Kit (NDK) provides a cross-compiling tool for compiling code written in C/C++ can be compiled to ARM, or x86 native code (or their 64-bit variants) for Android. The NDK uses the Clang compiler to compile C/C++. GCC was included until NDK r17, but removed in r18 in 2018.
Overview
Native libraries can be called from Java code running under the Android Runtime using System.loadLibrary, part of the standard Android Java classes.
Command-line tools can be compiled with the NDK and installed using adb.
Android uses Bionic as its C library, and the LLVM libc++ as its C++ Standard Library. The NDK also includes a variety of other APIs: zlib compression, OpenGL ES or Vulkan graphics, OpenSL ES audio, and various Android-specific APIs for things like logging, access to cameras, or accelerating neural networks.
The NDK includes support for CMake and its own ndk-build (based on GNU Make). Android Studio supports running either of these from Gradle. Other third-party tools allow integrating the NDK into Eclipse and Visual Studio.
For CPU profiling, the NDK also includes simpleperf which is similar to the Linux perf tool, but with better support for Android and specifically for mixed Java/C++ stacks.
References
References
- (November 13, 2012). "Android NDK | Android Developers". Developer.android.com.
- "NDK Downloads {{!}} Android Developers".
- Ratabouil, Sylvain. (2015). "Android NDK beginner's guide : discover the native side of Android and inject the power of C/C++ in your applications".
- Kosarevsky, Sergey. (2013). "Android NDK game development cookbook : over 70 exciting recipes to help you develop mobile games for Android in C++".
- Srinivas, Davanum. (December 9, 2007). "Android — Invoke JNI based methods (Bridging C/C++ and Java)".
- "java.lang.System". Android Developers.
- "Android Debug Bridge (adb)".
- "Android NDK Native APIs | Android NDK".
- (January 23, 2011). "Using Eclipse for Android C/C++ Development".
- (30 April 2015). "Using Visual Studio to Develop Native Android Code – VisualGDB Tutorials".
- "Simpleperf | Android NDK".
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Android NDK — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report