Skip to content
Surf Wiki
Save to docs
technology/software-engineering

From Surf Wiki (app.surf) — the open knowledge base

Android NDK

Software development kit


Summary

Software development kit

FieldValue
titleAndroid NDK
logo
screenshot
developerGoogle
released
latest release version
latest release date
programming languageC and C++
operating system{{Plainlist
platformIA-32 (Windows only) or x86-64 (Windows, macOS and Linux)
languageEnglish
genreSDK
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

  1. (November 13, 2012). "Android NDK | Android Developers". Developer.android.com.
  2. "NDK Downloads {{!}} Android Developers".
  3. Ratabouil, Sylvain. (2015). "Android NDK beginner's guide : discover the native side of Android and inject the power of C/C++ in your applications".
  4. Kosarevsky, Sergey. (2013). "Android NDK game development cookbook : over 70 exciting recipes to help you develop mobile games for Android in C++".
  5. Srinivas, Davanum. (December 9, 2007). "Android — Invoke JNI based methods (Bridging C/C++ and Java)".
  6. "java.lang.System". Android Developers.
  7. "Android Debug Bridge (adb)".
  8. "Android NDK Native APIs | Android NDK".
  9. (January 23, 2011). "Using Eclipse for Android C/C++ Development".
  10. (30 April 2015). "Using Visual Studio to Develop Native Android Code – VisualGDB Tutorials".
  11. "Simpleperf | Android NDK".
Wikipedia Source

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.

Want to explore this topic further?

Ask Mako anything about Android NDK — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This 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