Downloads
android {
ndkVersion "31.0.16996043"
}| Platform | Package | Size (Bytes) | SHA1 Checksum |
|---|---|---|---|
| Windows (x86_64) | android-ndk-r31-beta1-windows.zip | 763406116 | e2881e9df4ef2b150c5aeb01a7a310ee36d301cb |
| Mac (arm64/x86_64) | android-ndk-r31-beta1-darwin.dmg | 1134531017 | f9a75f717fca887488b23cf1345300e4a07d05d3 |
| Linux (x86_64) | android-ndk-r31-beta1-linux-x86_64.zip | 790644945 | 2447e89ff0cba8cfd78a8d9cc5030a8fb9c20c40 |
| Linux (arm64) | android-ndk-r31-beta1-linux-arm64.zip | 687475634 | be1d2d5505fcee614bb81e43b77abf06b8751be3 |
Changelog
Report issues to GitHub.
For Android Studio issues, go to https://b.android.com and file a bug using the
Android Studio component, not the NDK component.
If you're a build system maintainer that needs to use the tools in the NDK
directly, see the build system maintainers guide.
Announcements
-
Lollipop (APIs 21 and 22) is no longer supported. The minimum OS supported by
the NDK is Marshmallow (API level 23). See Issue 2188 for details. -
NDK now supports Linux Arm64 as a host and r31 includes an early (alpha) release for users to test.
We now provide both toolchains, sysroots, and other NDK tools all working on Linux Arm64. As a result
of supporting Linux Arm64, we have dropped some NDK tools (shaderc and yasm). These are also mentioned
in the Changes below. -
We have removed deprecated cpufeatures and ndk_helper libraries because they can be found in other
places like cpu_features and teapot samples in ndk-samples. -
The next NDK release (r32) will require glibc 2.27 for all Linux architectures (x86_64 and arm64).
Changes
- Updated LLVM to clang-r614150. See
clang_source_info.mdin the toolchain
directory for version information.- Issue 1261: Enabled _LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION for Bionic.
- Issue 1914: Enabled PAC/BTI for Android Targets by Default.
- Issue 2072: Toolchain runtimes (excluding builtins and compiler-rt) are built with
FORTIFY_SOURCE=3and stack-protector. - Issue 2165: Toolchain now supports libclang.lib for Windows.
- Issue 2101: Fixed issue where optimizations appeared in Clang's vendor string which
led to different host compilers to produce different binaries. - Issue 2193: Packed relocations for Android are now added automatically by Clang driver.
- Issue 2249: Bundle llvm-profgen in the toolchain.
- Issue 2259: Fixed linkage error when using std::jthread and C++20 modules.
- Issue 1752: Support Linux Arm64 as a host with more details available in the above
announcement and in the issue. - Issue 2240: Fixed stpncpy implementation to conform to the C standard when being used
with FORTIFY_SOURCE. - Issue 2245: ndk-build and the CMake toolchain file now enable
_FORTIFY_SOURCE=3by default (upgraded from_FORTIFY_SOURCE=2). - Issue 2247: Removed cpufeatures from the NDK. It has been deprecated for a
long time. Use cpu_features instead, which has anndk_compatlibrary for
code that still uses the oldcpu-features.hAPI. - Issue 2251: Removed ndk_helper from the NDK. It came from the teapot samples
and is still available in ndk-samples. - Issue 2252: Removed shaderc from the NDK.
- Issue 2253: Removed yasm from the NDK.
- Issue 2262: Fixed wrong header file association for inlined C++ lambdas in simpleperf.
- Issue 2263: ndk-build and the CMake toolchain file now pass the same
--targetspelling
as the NDK's clang wrapper scripts (for example,aarch64-linux-android21instead of
aarch64-none-linux-android21). Clang requires the triple to match exactly when loading a
PCH or module, so mixing them caused errors in tools likeclang-scan-deps.