Additional Information

A set of tools and files used to generate native code libraries from C and C++

Version Android NDK r27c
Requirements

macOS 10.13 High Sierra or later

Updated October 18, 2024
Author Google
Category Developer Tools
License Freeware
Language English
Download 225

Overview

The Android NDK for Mac is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages.

The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.

Android NDK for macOS may not be appropriate for most novice Android programmers who need to use only Java code and framework APIs to develop their apps. However, the NDK can be useful for cases in which you need to do one or more of the following:
  • Squeeze extra performance out of a device to achieve low latency or run computationally intensive applications, such as games or physics simulations.
  • Reuse your own or other developers' C or C++ libraries.

Using Android Studio 2.2 and higher, you can use the NDK to compile C and C++ code into a native library and package it into your APK using Gradle, the IDE's integrated build system. Your Java code can then call functions in your native library through the Java Native Interface (JNI) framework.

Android Studio's default build tool to compile native libraries is CMake. Android Studio also supports ndk-build due to the large number of existing projects that use the build toolkit. However, if you are creating a new native library, you should use CMake.

To compile and debug native code for your app, you need the following components:

  • The Android Native Development Kit (NDK): a set of tools that allows you to use C and C++ code with Android.
  • CMake: an external build tool that works alongside Gradle to build your native library. You do not need this component if you only plan to use ndk-build.
  • LLDB: the debugger Android Studio uses to debug native code.

Note: Requires Android SDK.

Previous versions More »

r27c October 18, 2024 r27b September 07, 2024 r27 July 22, 2024 r26d April 12, 2024 1.5 GB r26b October 12, 2023 1.5 GB r26 September 20, 2023 1.5 GB