Skip to content

Android NDK Release Notes

Google ยท Native Android development tools for compiling C and C++, debugging native libraries and integrating them into Android apps.

CaskDeveloper Toolsย 2.3K
Install command
brew install --cask android-ndk
30-day installs
534
#445 in App
1-year installs
7.4K
Last 365 days
Latest version
30
Download size
1.1GB
dmg
Release cadence
Monthly
0 releases in 30 days
  1. 30

    Latest

    OpenNavo editorial Added to Homebrew

    Updates LLVM, fixes compiler and debugger issues and raises the maximum API level.

    Changes
    Updates LLVM to clang-r574158c.Fixes runtime crashes with LTO and nested exception handlers.Fixes ARM -O3 compiler hangs and reference/pointer miscompilation.Fixes AArch64 defaulted equality compilation and wchar.h module conflicts.Fixes LLDB reading a shared library that is the last APK entry.Improves ARM dot-product code generation and raises sysroot maximum API to 37.

    Android NDK r30

    Updates LLVM, fixes compiler and debugger issues and raises the maximum API level.

    • Updates LLVM to clang-r574158c.
    • Fixes runtime crashes with LTO and nested exception handlers.
    • Fixes ARM -O3 compiler hangs and reference/pointer miscompilation.
    • Fixes AArch64 defaulted equality compilation and wchar.h module conflicts.
    • Fixes LLDB reading a shared library that is the last APK entry.
    • Improves ARM dot-product code generation and raises sysroot maximum API to 37.

    Source: Official changelog.

  2. 29

    OpenNavo editorial Added to Homebrew

    Updates LLVM and improves crash-stack resolution, LLDB launch and profiling.

    Changes
    Updates LLVM to clang-r563880c.Fixes lldb.sh when installed in a path containing spaces.Fixes unique_ptr-related sizeof application to function-reference types.Matches ndk-stack symbols by build ID even when names differ or are absent.Allows native-debug-symbols.zip as ndk-stackโ€™s sym argument.Removes llvm-lipo and fixes simpleperf dependencies and invalid report data.

    Android NDK r29

    Updates LLVM and improves crash-stack resolution, LLDB launch and profiling.

    • Updates LLVM to clang-r563880c.
    • Fixes lldb.sh when installed in a path containing spaces.
    • Fixes unique_ptr-related sizeof application to function-reference types.
    • Matches ndk-stack symbols by build ID even when names differ or are absent.
    • Allows native-debug-symbols.zip as ndk-stackโ€™s sym argument.
    • Removes llvm-lipo and fixes simpleperf dependencies and invalid report data.

    Source: Official changelog.

  3. 28c

    OpenNavo editorial Added to Homebrew

    Updates LLVM and fixes macOS LLDB and explicit 4 KiB page-size configuration.

    Changes
    Updates LLVM to clang-r530567e.Fixes lldb.sh paths containing spaces.Fixes lldb.sh failing to find libpython on macOS.Corrects 4 KiB configuration through the flexible-page-size build options.

    Android NDK r28c

    Updates LLVM and fixes macOS LLDB and explicit 4 KiB page-size configuration.

    • Updates LLVM to clang-r530567e.
    • Fixes lldb.sh paths containing spaces.
    • Fixes lldb.sh failing to find libpython on macOS.
    • Corrects 4 KiB configuration through the flexible-page-size build options.

    Source: Official changelog.

  4. 28
  5. 28b
  6. 27c
  7. 27
  8. 27b
  9. 26d
  10. 26c
  11. 26
  12. 26b
  13. 9

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "29.0.14206865"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r29-windows.zip
    833850862
    ab3bb30fbb9e6903666d60c55d11e78b04e07472
    
    macOS
    android-ndk-r29-darwin.dmg
    1156294030
    0eecb29cfe791e039740e2a8bcf0af02b7132bd8
    
    Linux
    android-ndk-r29-linux.zip
    783549481
    87e2bb7e9be5d6a1c6cdf5ec40dd4e0c6d07c30b
    

    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

    Changes

    • Updated LLVM to clang-r563880c. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2144: Fixed issue where lldb.sh did not work when installed to a path which contained spaces.
      • Issue 2170: Fixed issue where std::unique_ptr caused sizeof to be sometimes applied to function reference types.
    • ndk-stack will now find symbols in files with matching build IDs even if the file names do not match.
    • ndk-stack will now find symbols in files with matching build IDs even if the name of the file is not present in the trace.
    • Issue 2078: ndk-stack now accepts a native-debug-symbols.zip file for the --sym argument as an alternative to a directory.
    • Issue 2109: llvm-lipo has been removed. This tool is only useful for building macOS binaries but was mistakenly included in the NDK.
    • Issue 2135: simpleperf no longer depends on Tk-Inter in non-GUI mode.
    • Issue 2146: Fixed a case where invalid data would appear in simpleperf reports.
  14. 8c

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "28.2.13676358"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r28c-windows.zip
    748118221
    086bba43ff2f5eb0e387b15c8278bb4e0d89ba1d
    
    macOS
    android-ndk-r28c-darwin.dmg
    1049465798
    60e8efb121aa7ce9857afbffa17b2da4c37b515a
    
    Linux
    android-ndk-r28c-linux.zip
    722261334
    a7b54a5de87fecd125a17d54f73c446199e72a64
    

    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

    • The 16 KiB page size compatibility option that was added in r27 is now on by default. If necessary, you can still opt-out (see below).

    r28c

    • Updated LLVM to clang-r530567e. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2144: Fixed issue where lldb.sh did not work when installed to a path which contained spaces.
    • Issue 2143: Fixed lldb.sh not finding libpython on macOS.
    • Issue 2145: ndk-build and CMake now appropriately configure 4KiB page sizes when APP_SUPPORT_FLEXIBLE_PAGE_SIZES/ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES are used.

    r28b

    • Updated LLVM to clang-r530567d. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2136: Fixed limits.h not including any of the LONG_LONG related macros.
    • Issue 1591: libz.a and libdl.a are no longer built with LTO, resolving occasional linking failures resulting from LLVM version desynchronization.

    Changes

    • Updated LLVM to clang-r530567b. See clang_source_info.md in the toolchain directory for version information.

      • Runtime libraries for non-Android have been removed reduce disk usage.
      • libc++ now includes debug info to aid debugging. This may make libc++_shared.so and any binaries that link libc++_static.a much larger before they are stripped. The Android Gradle Plugin will strip binaries when creating APKs, so this should not affect production apps.
      • Issue 2046: libclang and libclang-cpp are now supported.
    • PAGE_SIZE is no longer defined by default for arm64-v8a or x86_64. To re-enable, set APP_SUPPORT_FLEXIBLE_PAGE_SIZES (ndk-build) or ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES (CMake) to false. See Support 16 KB page sizes for more information.

    • The default alignment of shared libraries for arm64-v86 and x86_64 is now 16k. To revert to 4k alignment, set APP_SUPPORT_FLEXIBLE_PAGE_SIZES (ndk-build) or ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES (CMake) to false. See Support 16 KB page sizes for more information.

    • Issue 1307: Removed non-NDK binder headers. A number of binder headers that should have been shipped with aidl were mistakenly shipped in the NDK. These headers are tightly coupled to the version of aidl used, so this introduced an unwanted version restriction between build-tools and the NDK. If you are using the NDK aidl backend, you will need to pass the aidl include path when building. See the aidl backend docs for more information.

    • Issue 2058: Weak API references now work for libc APIs. This was enabled by conditionally removing the #if __ANDROID_API__ >= ... guards that previously wrapped declarations in libc headers when weak API references are used. When weak API references are not used (the default behavior), the declarations will still be hidden by the preprocessor.

      If your project contains polyfills for any of those APIs and uses weak API references, this change may break your build due to the conflicting declarations. The simplest fix is to rename your polyfill to not collide with libc. For example, rename conflicting_api to conflicting_api_fallback and call that instead. Use #define conflicting_api() conflicting_api_fallback() if you want to avoid rewriting callsites.

      Please open a bug if you run into issues with existing polyfills. We may be able to add the polyfill directly to the NDK.

    • Issue 2100: Raised minimum required CMake version of the NDK's toolchain file from 3.6.0 to 3.10.0 to address warnings from new versions of CMake about upcoming loss of compatibility with versions older than 3.10.

  15. 8

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "28.0.13004108"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r28-windows.zip
    748943210
    f79a00c721dc5c15b2bf093d7bb2af96496a42b2
    
    macOS
    android-ndk-r28-darwin.dmg
    1047230704
    ee3fbd3fc29b2133990aeb352494ac63e114c53e
    
    Linux
    android-ndk-r28-linux.zip
    723148067
    894f469c5192a116d21f412de27966140a530ebc
    

    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

    • The 16 KiB page size compatibility option that was added in r27 is now on by default. If necessary, you can still opt-out (see below).

    Changes

    • Updated LLVM to clang-r530567c. See clang_source_info.md in the toolchain directory for version information.

      • Runtime libraries for non-Android have been removed reduce disk usage.
      • libc++ now includes debug info to aid debugging. This may make libc++_shared.so and any binaries that link libc++_static.a much larger before they are stripped. The Android Gradle Plugin will strip binaries when creating APKs, so this should not affect production apps.
      • Issue 2046: libclang and libclang-cpp are now supported.
    • PAGE_SIZE is no longer defined by default for arm64-v8a or x86_64. To re-enable, set APP_SUPPORT_FLEXIBLE_PAGE_SIZES (ndk-build) or ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES (CMake) to false. See Support 16 KB page sizes for more information.

    • The default alignment of shared libraries for arm64-v86 and x86_64 is now 16k. To revert to 4k alignment, set APP_SUPPORT_FLEXIBLE_PAGE_SIZES (ndk-build) or ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES (CMake) to false. See Support 16 KB page sizes for more information.

    • Issue 1307: Removed non-NDK binder headers. A number of binder headers that should have been shipped with aidl were mistakenly shipped in the NDK. These headers are tightly coupled to the version of aidl used, so this introduced an unwanted version restriction between build-tools and the NDK. If you are using the NDK aidl backend, you will need to pass the aidl include path when building. See the aidl backend docs for more information.

    • Issue 2058: Weak API references now work for libc APIs. This was enabled by conditionally removing the #if __ANDROID_API__ >= ... guards that previously wrapped declarations in libc headers when weak API references are used. When weak API references are not used (the default behavior), the declarations will still be hidden by the preprocessor.

      If your project contains polyfills for any of those APIs and uses weak API references, this change may break your build due to the conflicting declarations. The simplest fix is to rename your polyfill to not collide with libc. For example, rename conflicting_api to conflicting_api_fallback and call that instead. Use #define conflicting_api() conflicting_api_fallback() if you want to avoid rewriting callsites.

      Please open a bug if you run into issues with existing polyfills. We may be able to add the polyfill directly to the NDK.

    • Issue 2100: Raised minimum required CMake version of the NDK's toolchain file from 3.6.0 to 3.10.0 to address warnings from new versions of CMake about upcoming loss of compatibility with versions older than 3.10.

  16. 8b

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "28.1.13356709"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r28b-windows.zip
    748117965
    c7d82072807fcabbd6ee356476761d8729307185
    
    macOS
    android-ndk-r28b-darwin.dmg
    1046233044
    e6ea8af729119680b22ee524e5b0569a1ae11525
    
    Linux
    android-ndk-r28b-linux.zip
    722264879
    f574d3165405bd59ffc5edaadac02689075a729f
    

    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

    • The 16 KiB page size compatibility option that was added in r27 is now on by default. If necessary, you can still opt-out (see below).

    r28b

    • Updated LLVM to clang-r530567d. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2136: Fixed limits.h not including any of the LONG_LONG related macros.
    • Issue 1591: libz.a and libdl.a are no longer built with LTO, resolving occasional linking failures resulting from LLVM version desynchronization.

    Changes

    • Updated LLVM to clang-r530567b. See clang_source_info.md in the toolchain directory for version information.

      • Runtime libraries for non-Android have been removed reduce disk usage.
      • libc++ now includes debug info to aid debugging. This may make libc++_shared.so and any binaries that link libc++_static.a much larger before they are stripped. The Android Gradle Plugin will strip binaries when creating APKs, so this should not affect production apps.
      • Issue 2046: libclang and libclang-cpp are now supported.
    • PAGE_SIZE is no longer defined by default for arm64-v8a or x86_64. To re-enable, set APP_SUPPORT_FLEXIBLE_PAGE_SIZES (ndk-build) or ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES (CMake) to false. See Support 16 KB page sizes for more information.

    • The default alignment of shared libraries for arm64-v86 and x86_64 is now 16k. To revert to 4k alignment, set APP_SUPPORT_FLEXIBLE_PAGE_SIZES (ndk-build) or ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES (CMake) to false. See Support 16 KB page sizes for more information.

    • Issue 1307: Removed non-NDK binder headers. A number of binder headers that should have been shipped with aidl were mistakenly shipped in the NDK. These headers are tightly coupled to the version of aidl used, so this introduced an unwanted version restriction between build-tools and the NDK. If you are using the NDK aidl backend, you will need to pass the aidl include path when building. See the aidl backend docs for more information.

    • Issue 2058: Weak API references now work for libc APIs. This was enabled by conditionally removing the #if __ANDROID_API__ >= ... guards that previously wrapped declarations in libc headers when weak API references are used. When weak API references are not used (the default behavior), the declarations will still be hidden by the preprocessor.

      If your project contains polyfills for any of those APIs and uses weak API references, this change may break your build due to the conflicting declarations. The simplest fix is to rename your polyfill to not collide with libc. For example, rename conflicting_api to conflicting_api_fallback and call that instead. Use #define conflicting_api() conflicting_api_fallback() if you want to avoid rewriting callsites.

      Please open a bug if you run into issues with existing polyfills. We may be able to add the polyfill directly to the NDK.

    • Issue 2100: Raised minimum required CMake version of the NDK's toolchain file from 3.6.0 to 3.10.0 to address warnings from new versions of CMake about upcoming loss of compatibility with versions older than 3.10.

  17. 7d

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "27.3.13750724"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r27d-windows.zip
    781506724
    56607cbccd3642d4a1991f6bb3114a00f884f426
    
    macOS
    android-ndk-r27d-darwin.dmg
    924374593
    80f11292080fab4e869799f1d23caa88dcf3c709
    
    Linux
    android-ndk-r27d-linux.zip
    663956036
    22105e410cf29afcf163760cc95522b9fb981121
    

    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

    • Android V will allow OEMs to ship arm64-v8a devices with 16KiB page sizes. Devices that use this configuration will not be able to run existing apps that use native code. To be compatible with these devices, applications will need to rebuild all their native code to be 16KiB aligned, and rewrite any code which assumes a specific page size. ndk-build and CMake have options to enable this mode (see note about APP_SUPPORT_FLEXIBLE_PAGE_SIZES and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES below). A future version of the NDK will enable this mode by default. If you're using or maintaining a third-party build system, consult the build system maintainers guide for instructions.

      See Support 16 KB page sizes for more information.

    r27d

    • Updated LLVM to clang-r522817d. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2144: Fixed issue where lldb.sh did not work when installed to a path which contained spaces.
    • Issue 2143: Fixed lldb.sh not finding libpython on macOS.

    r27c

    • Updated LLVM to clang-r522817c. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2040: Further fixes for miscompiles of indirect gotos.
      • Issue 2064: Fix HWAsan miscompilation.
      • Issue 2070: Fix crash in instantiation of function definitions.
      • Issue 2084: Fix for incorrect compiler error on overloaded member functions with ref-qualifiers.

    r27b

    • Updated LLVM to clang-r522817b. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2040: Fixed miscompile with indirect gotos.
      • Issue 2054: Fixed crash in x86 fp16 instruction selection.
      • Issue 2059: Fixed infinite loop in aarch64 vector instruction selection.
    • Issue 2032: Fixed compatibility issues with projects that used a very old cmake_minimum_required version ("Policy CMP0057 is not set: Support new IN_LIST if() operator").
    • Issue 2039: Fixed LOCAL_STRIP_MODE not being reset by include $(CLEAR_VARS).
    • Issue 2049: Restored metadata used by CMake in non-toolchain-file use cases that used CMAKE_SYSTEM_PROCESSOR instead of CMAKE_ANDROID_ARCH_ABI. If you ran into this problem, you should switch to using CMAKE_ANDROID_ARCH_ABI because that's what CMake's docs say to use. Better still, use the NDK's toolchain file.

    Changes

    • Updated LLVM to clang-r522817. See clang_source_info.md in the toolchain directory for version information.
      • Issue 1728: Clang now emits an error for invalid Android target versions.
      • Issue 1853: clang-scan-deps is now included.
      • Issue 1911: Fixed inconsistent std::regex_replace results.
      • Issue 1947: Improved support for AArch64 function multi-versioning in clang.
      • Issue 1963: Fixed undefined behavior in std::unexpected::has_value().
      • Issue 1988: Added aarch64 support for preserve_all calling convention.
      • Issue 2007: Fixed crash in class template argument deduction caused by self-referential friend declaration.
      • Issue 2010: Removed superfluous libraries to reduce disk use.
      • Issue 2012: Fixed front end crash when using concepts and modules.
      • Issue 2013: Fixed false positive ODR violation in global module fragments.
      • Issue 2023: Fixed Clang crashes related to lambda captures in unevaluated contexts.
      • Issue 2024: Removed invalid __attribute__((__const__)) from gettid.
    • A RISC-V sysroot (AKA riscv64, or rv64) has been added. It is not supported. It is present to aid bringup for OS vendors, but it's not yet a supported Android ABI. It will not be built by default.
    • Issue 1856: Target-prefixed cmd wrappers for clang should now behave appropriately when the first argument includes quotes. You probably do not need to use those wrappers. In most cases where you would use aarch64-linux-android21-clang, you can instead use clang -target aarch64-linux-android21, e.g. CC="clang -target aarch64-linux-android21" ./configure. The wrappers are only needed when working with systems that do not properly handle a CC that includes arguments.
    • Issue 1898: ndk-stack now tolerates 0x prefixed addresses.
    • Issue 1921: ANDROID_USE_LEGACY_TOOLCHAIN_FILE value is now preserved during try-compile steps when ON.
    • Issue 1974: Unintentionally shipped Vulkan headers have been removed from sources/third_party/vulkan. The standard Vulkan headers are included in the Android sysroot, which Clang will find automatically.
    • Issue 1993: ndk-stack now tolerates invalid UTF-8 characters in the trace.
    • Issue 1994: Fixed ndk-gdb/ndk-lldb to use the correct path for make and other tools.
    • Added APP_SUPPORT_FLEXIBLE_PAGE_SIZES for ndk-build and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES for CMake. Set to APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true in your Application.mk or pass -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON to CMake (via android.defaultConfig.externalNativeBuild.cmake.arguments if you're using the Android Gradle Plugin) to build your code to be compatible with devices that use a 16KiB page size. Third-party build system users and maintainers should consult the build system maintainers guide.
    • Symlinks are now properly preserved in the macOS App Bundle. The NDK installed via that method is now the same size as the one installed via the SDK manager.
    • The unsupported libclang, libclang-cpp, libLLVM, and libLTO libraries were removed to save space.
  18. 7c

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "27.2.12479018"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r27c-windows.zip
    781511249
    ac5f7762764b1f15341094e148ad4f847d050c38
    
    macOS
    android-ndk-r27c-darwin.dmg
    921212233
    04d8c43eb4e884c4b16bbf7733ac9179a13b7b20
    
    Linux
    android-ndk-r27c-linux.zip
    663987688
    090e8083a715fdb1a3e402d0763c388abb03fb4e
    

    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

    • Android V will allow OEMs to ship arm64-v8a devices with 16KiB page sizes. Devices that use this configuration will not be able to run existing apps that use native code. To be compatible with these devices, applications will need to rebuild all their native code to be 16KiB aligned, and rewrite any code which assumes a specific page size. ndk-build and CMake have options to enable this mode (see note about APP_SUPPORT_FLEXIBLE_PAGE_SIZES and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES below). A future version of the NDK will enable this mode by default. If you're using or maintaining a third-party build system, consult the build system maintainers guide for instructions.

      See Support 16 KB page sizes for more information.

    r27c

    • Updated LLVM to clang-r522817c. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2040: Further fixes for miscompiles of indirect gotos.
      • Issue 2064: Fix HWAsan miscompilation.
      • Issue 2070: Fix crash in instantiation of function definitions.
      • Issue 2084: Fix for incorrect compiler error on overloaded member functions with ref-qualifiers.

    r27b

    • Updated LLVM to clang-r522817b. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2040: Fixed miscompile with indirect gotos.
      • Issue 2054: Fixed crash in x86 fp16 instruction selection.
      • Issue 2059: Fixed infinite loop in aarch64 vector instruction selection.
    • Issue 2032: Fixed compatibility issues with projects that used a very old cmake_minimum_required version ("Policy CMP0057 is not set: Support new IN_LIST if() operator").
    • Issue 2039: Fixed LOCAL_STRIP_MODE not being reset by include $(CLEAR_VARS).
    • Issue 2049: Restored metadata used by CMake in non-toolchain-file use cases that used CMAKE_SYSTEM_PROCESSOR instead of CMAKE_ANDROID_ARCH_ABI. If you ran into this problem, you should switch to using CMAKE_ANDROID_ARCH_ABI because that's what CMake's docs say to use. Better still, use the NDK's toolchain file.

    Changes

    • Updated LLVM to clang-r522817. See clang_source_info.md in the toolchain directory for version information.
      • Issue 1728: Clang now emits an error for invalid Android target versions.
      • Issue 1853: clang-scan-deps is now included.
      • Issue 1911: Fixed inconsistent std::regex_replace results.
      • Issue 1947: Improved support for AArch64 function multi-versioning in clang.
      • Issue 1963: Fixed undefined behavior in std::unexpected::has_value().
      • Issue 1988: Added aarch64 support for preserve_all calling convention.
      • Issue 2007: Fixed crash in class template argument deduction caused by self-referential friend declaration.
      • Issue 2010: Removed superfluous libraries to reduce disk use.
      • Issue 2012: Fixed front end crash when using concepts and modules.
      • Issue 2013: Fixed false positive ODR violation in global module fragments.
      • Issue 2023: Fixed Clang crashes related to lambda captures in unevaluated contexts.
      • Issue 2024: Removed invalid __attribute__((__const__)) from gettid.
    • A RISC-V sysroot (AKA riscv64, or rv64) has been added. It is not supported. It is present to aid bringup for OS vendors, but it's not yet a supported Android ABI. It will not be built by default.
    • Issue 1856: Target-prefixed cmd wrappers for clang should now behave appropriately when the first argument includes quotes. You probably do not need to use those wrappers. In most cases where you would use aarch64-linux-android21-clang, you can instead use clang -target aarch64-linux-android21, e.g. CC="clang -target aarch64-linux-android21" ./configure. The wrappers are only needed when working with systems that do not properly handle a CC that includes arguments.
    • Issue 1898: ndk-stack now tolerates 0x prefixed addresses.
    • Issue 1921: ANDROID_USE_LEGACY_TOOLCHAIN_FILE value is now preserved during try-compile steps when ON.
    • Issue 1974: Unintentionally shipped Vulkan headers have been removed from sources/third_party/vulkan. The standard Vulkan headers are included in the Android sysroot, which Clang will find automatically.
    • Issue 1993: ndk-stack now tolerates invalid UTF-8 characters in the trace.
    • Issue 1994: Fixed ndk-gdb/ndk-lldb to use the correct path for make and other tools.
    • Added APP_SUPPORT_FLEXIBLE_PAGE_SIZES for ndk-build and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES for CMake. Set to APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true in your Application.mk or pass -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON to CMake (via android.defaultConfig.externalNativeBuild.cmake.arguments if you're using the Android Gradle Plugin) to build your code to be compatible with devices that use a 16KiB page size. Third-party build system users and maintainers should consult the build system maintainers guide.
    • Symlinks are now properly preserved in the macOS App Bundle. The NDK installed via that method is now the same size as the one installed via the SDK manager.
    • The unsupported libclang, libclang-cpp, libLLVM, and libLTO libraries were removed to save space.
  19. 7

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "27.0.12077973"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r27-windows.zip
    781482169
    0ea2756e6815356831bda3af358cce4cdb6a981e
    
    macOS
    android-ndk-r27-darwin.dmg
    921198814
    b06865a3655b41ae53b2e589908bcf90080e3650
    
    Linux
    android-ndk-r27-linux.zip
    663957918
    5e5cd517bdb98d7e0faf2c494a3041291e71bdcc
    

    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

    • Android V will allow OEMs to ship arm64-v8a devices with 16KiB page sizes. Devices that use this configuration will not be able to run existing apps that use native code. To be compatible with these devices, applications will need to rebuild all their native code to be 16KiB aligned, and rewrite any code which assumes a specific page size. ndk-build and CMake have options to enable this mode (see note about APP_SUPPORT_FLEXIBLE_PAGE_SIZES and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES below). A future version of the NDK will enable this mode by default. If you're using or maintaining a third-party build system, consult the build system maintainers guide for instructions.

      See Support 16 KB page sizes for more information.

    Changes

    • Updated LLVM to clang-r522817. See clang_source_info.md in the toolchain directory for version information.
      • Issue 1728: Clang now emits an error for invalid Android target versions.
      • Issue 1853: clang-scan-deps is now included.
      • Issue 1911: Fixed inconsistent std::regex_replace results.
      • Issue 1947: Improved support for AArch64 function multi-versioning in clang.
      • Issue 1963: Fixed undefined behavior in std::unexpected::has_value().
      • Issue 1988: Added aarch64 support for preserve_all calling convention.
      • Issue 2007: Fixed crash in class template argument deduction caused by self-referential friend declaration.
      • Issue 2010: Removed superfluous libraries to reduce disk use.
      • Issue 2012: Fixed front end crash when using concepts and modules.
      • Issue 2013: Fixed false positive ODR violation in global module fragments.
      • Issue 2023: Fixed Clang crashes related to lambda captures in unevaluated contexts.
      • Issue 2024: Removed invalid __attribute__((__const__)) from gettid.
    • A RISC-V sysroot (AKA riscv64, or rv64) has been added. It is not supported. It is present to aid bringup for OS vendors, but it's not yet a supported Android ABI. It will not be built by default.
    • Issue 1856: Target-prefixed cmd wrappers for clang should now behave appropriately when the first argument includes quotes. You probably do not need to use those wrappers. In most cases where you would use aarch64-linux-android21-clang, you can instead use clang -target aarch64-linux-android21, e.g. CC="clang -target aarch64-linux-android21" ./configure. The wrappers are only needed when working with systems that do not properly handle a CC that includes arguments.
    • Issue 1898: ndk-stack now tolerates 0x prefixed addresses.
    • Issue 1921: ANDROID_USE_LEGACY_TOOLCHAIN_FILE value is now preserved during try-compile steps when ON.
    • Issue 1974: Unintentionally shipped Vulkan headers have been removed from sources/third_party/vulkan. The standard Vulkan headers are included in the Android sysroot, which Clang will find automatically.
    • Issue 1993: ndk-stack now tolerates invalid UTF-8 characters in the trace.
    • Issue 1994: Fixed ndk-gdb/ndk-lldb to use the correct path for make and other tools.
    • Added APP_SUPPORT_FLEXIBLE_PAGE_SIZES for ndk-build and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES for CMake. Set to APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true in your Application.mk or pass -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON to CMake (via android.defaultConfig.externalNativeBuild.cmake.arguments if you're using the Android Gradle Plugin) to build your code to be compatible with devices that use a 16KiB page size. Third-party build system users and maintainers should consult the build system maintainers guide.
    • Symlinks are now properly preserved in the macOS App Bundle. The NDK installed via that method is now the same size as the one installed via the SDK manager.
    • The unsupported libclang, libclang-cpp, libLLVM, and libLTO libraries were removed to save space.
  20. 7b

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "27.1.12297006"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r27b-windows.zip
    781495902
    3bb7efc850cd0af7707854b7e0d5c3b6a7153703
    
    macOS
    android-ndk-r27b-darwin.dmg
    921211770
    f8979ac0060742045209c742367f6bf5b88df796
    
    Linux
    android-ndk-r27b-linux.zip
    663976775
    6fc476b2e57d7c01ac0c95817746b927035b9749
    

    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

    • Android V will allow OEMs to ship arm64-v8a devices with 16KiB page sizes. Devices that use this configuration will not be able to run existing apps that use native code. To be compatible with these devices, applications will need to rebuild all their native code to be 16KiB aligned, and rewrite any code which assumes a specific page size. ndk-build and CMake have options to enable this mode (see note about APP_SUPPORT_FLEXIBLE_PAGE_SIZES and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES below). A future version of the NDK will enable this mode by default. If you're using or maintaining a third-party build system, consult the build system maintainers guide for instructions.

      See Support 16 KB page sizes for more information.

    r27b

    • Updated LLVM to clang-r522817b. See clang_source_info.md in the toolchain directory for version information.
      • Issue 2040: Fixed miscompile with indirect gotos.
      • Issue 2054: Fixed crash in x86 fp16 instruction selection.
      • Issue 2059: Fixed infinite loop in aarch64 vector instruction selection.
    • Issue 2032: Fixed compatibility issues with projects that used a very old cmake_minimum_required version ("Policy CMP0057 is not set: Support new IN_LIST if() operator").
    • Issue 2039: Fixed LOCAL_STRIP_MODE not being reset by include $(CLEAR_VARS).
    • Issue 2049: Restored metadata used by CMake in non-toolchain-file use cases that used CMAKE_SYSTEM_PROCESSOR instead of CMAKE_ANDROID_ARCH_ABI. If you ran into this problem, you should switch to using CMAKE_ANDROID_ARCH_ABI because that's what CMake's docs say to use. Better still, use the NDK's toolchain file.

    Changes

    • Updated LLVM to clang-r522817. See clang_source_info.md in the toolchain directory for version information.
      • Issue 1728: Clang now emits an error for invalid Android target versions.
      • Issue 1853: clang-scan-deps is now included.
      • Issue 1911: Fixed inconsistent std::regex_replace results.
      • Issue 1947: Improved support for AArch64 function multi-versioning in clang.
      • Issue 1963: Fixed undefined behavior in std::unexpected::has_value().
      • Issue 1988: Added aarch64 support for preserve_all calling convention.
      • Issue 2007: Fixed crash in class template argument deduction caused by self-referential friend declaration.
      • Issue 2010: Removed superfluous libraries to reduce disk use.
      • Issue 2012: Fixed front end crash when using concepts and modules.
      • Issue 2013: Fixed false positive ODR violation in global module fragments.
      • Issue 2023: Fixed Clang crashes related to lambda captures in unevaluated contexts.
      • Issue 2024: Removed invalid __attribute__((__const__)) from gettid.
    • A RISC-V sysroot (AKA riscv64, or rv64) has been added. It is not supported. It is present to aid bringup for OS vendors, but it's not yet a supported Android ABI. It will not be built by default.
    • Issue 1856: Target-prefixed cmd wrappers for clang should now behave appropriately when the first argument includes quotes. You probably do not need to use those wrappers. In most cases where you would use aarch64-linux-android21-clang, you can instead use clang -target aarch64-linux-android21, e.g. CC="clang -target aarch64-linux-android21" ./configure. The wrappers are only needed when working with systems that do not properly handle a CC that includes arguments.
    • Issue 1898: ndk-stack now tolerates 0x prefixed addresses.
    • Issue 1921: ANDROID_USE_LEGACY_TOOLCHAIN_FILE value is now preserved during try-compile steps when ON.
    • Issue 1974: Unintentionally shipped Vulkan headers have been removed from sources/third_party/vulkan. The standard Vulkan headers are included in the Android sysroot, which Clang will find automatically.
    • Issue 1993: ndk-stack now tolerates invalid UTF-8 characters in the trace.
    • Issue 1994: Fixed ndk-gdb/ndk-lldb to use the correct path for make and other tools.
    • Added APP_SUPPORT_FLEXIBLE_PAGE_SIZES for ndk-build and ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES for CMake. Set to APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true in your Application.mk or pass -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON to CMake (via android.defaultConfig.externalNativeBuild.cmake.arguments if you're using the Android Gradle Plugin) to build your code to be compatible with devices that use a 16KiB page size. Third-party build system users and maintainers should consult the build system maintainers guide.
    • Symlinks are now properly preserved in the macOS App Bundle. The NDK installed via that method is now the same size as the one installed via the SDK manager.
    • The unsupported libclang, libclang-cpp, libLLVM, and libLTO libraries were removed to save space.
  21. 6d

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "26.3.11579264"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r26d-windows.zip
    665022840
    c7ea35ffe916082876611da1a6d5618d15430c29
    
    macOS
    android-ndk-r26d-darwin.dmg
    1655224062
    703100c3d721b04e09f02f3fddc5f1f5ced28b10
    
    Linux
    android-ndk-r26d-linux.zip
    668556491
    fcdad75a765a46a9cf6560353f480db251d14765
    

    Changelog

    Report issues to GitHub.

    For Android Studio issues, follow the docs on the Android Studio site.

    If you're a build system maintainer that needs to use the tools in the NDK directly, see the build system maintainers guide.

    Announcements

    • KitKat (APIs 19 and 20) is no longer supported. The minimum OS supported by the NDK is Lollipop (API level 21). See Issue 1751 for details.
    • libc++ has been updated. The NDK's libc++ now comes directly from our LLVM toolchain, so every future LLVM update is also a libc++ update. Future changelogs will not explicitly mention libc++ updates.

    r26d

    • Issue 1994: Fixed ndk-gdb/ndk-lldb to use the correct path for make and other tools.

    r26c

    • Updated LLVM to clang-r487747e. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • Issue 1928: Fixed Clang crash in instruction selection for 32-bit armv8 floating point.
      • Issue 1953: armeabi-v7a libc++ libraries are once again built as thumb.

    r26b

    • Updated LLVM to clang-r487747d. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • This update was intended to be included in r26 RC 1. The original release noted these fixes in the changelog, but the new toolchain had not actually been included.
      • Issue 1907: HWASan linker will be used automatically for minSdkVersion 34 or higher.
      • Issue 1909: Fixed ABI mismatch between function-multi-versioning and ifunc resolvers.
    • Issue 1938: Fixed ndk-stack to use the correct path for llvm-symbolizer and other tools.

    Changes

    • Updated LLVM to clang-r487747c. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • Clang now treats -Wimplicit-function-declaration as an error rather than a warning in C11 and newer. Clang's default C standard is 17, so this is a change in default behavior compared to older versions of Clang, but is the behavior defined by C99.

        If you encounter these errors when upgrading, you most likely forgot an #include. If you cannot (or do not want to) fix those issues, you can revert to the prior behavior with -Wno-error=implicit-function-declaration.

        C++ users are unaffected. This has never been allowed in C++.

        See https://reviews.llvm.org/D122983 for more details.

      • Issue 1298: Fixed seccomp error with ASan on x86_64 devices.

      • Issue 1530: Updated libc++ to match LLVM version.

      • Issue 1565: Fixed lldb ncurses issue with terminal database on Darwin.

      • Issue 1677: Fixed Clang crash in optimizer.

      • Issue 1679: Clang will now automatically enable ELF TLS for minSdkVersion 29 or higher.

      • Issue 1834: Fixed Clang crash during SVE conversions.

      • Issue 1860: Fixed miscompilation affecting armv7.

      • Issue 1861: Fixed front end crash in Clang.

      • Issue 1862: Fixed Clang crash for aarch64 with -Os.

      • Issue 1880: Fixed crash in clang-format.

      • Issue 1883: Fixed crash when incorrectly using neon intrinsics.

    • Version scripts that name public symbols that are not present in the library will now emit an error by default for ndk-build and the CMake toolchain file. Build failures caused by this error are likely a bug in your library or a mistake in the version script. To revert to the earlier behavior, pass -DANDROID_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS=ON to CMake or set LOCAL_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS := true in your Android.mk file. For other build systems, see the secion titled "Version script validation" in the build system maintainers guide.
    • [Issue 873]: Weak symbols for API additions is supported. Provide __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ as an option.
    • Issue 1400: NDK paths with spaces will now be diagnosed by ndk-build on Windows. This has never been supported for any OS, but the error message wasn't previously working on Windows either.
    • Issue 1764: Fixed Python 3 incompatibility when using ndk-gdb with -f.
    • Issue 1803: Removed useless strtoq and strtouq from the libc stub libraries. These were never exposed in the header files, but could confuse some autoconf like systems.
    • Issue 1852: Fixed ODR issue in linux/time.h.
    • Issue 1878: Fixed incorrect definition of WIFSTOPPED.
    • ndk-build now uses clang rather than clang++ when linking modules that do not have C++ sources. There should not be any observable behavior differences because ndk-build previously handled the C/C++ linking differences itself.
    • ndk-build now delegates C++ stdlib linking to the Clang driver. It is unlikely that this will cause any observable behavior change, but any new behavior will more closely match CMake and other build systems.

    Known Issues

    This is not intended to be a comprehensive list of all outstanding bugs.

    • Issue 360: thread_local variables with non-trivial destructors will cause segfaults if the containing library is dlcloseed. This was fixed in API 28, but code running on devices older than API 28 will need a workaround. The simplest fix is to stop calling dlclose. If you absolutely must continue calling dlclose, see the following table:

      Pre-API 23 APIs 23-27 API 28+
      No workarounds Works for static STL Broken Works
      -Wl,-z,nodelete Works for static STL Works Works
      No dlclose Works Works Works

      If your code must run on devices older than M (API 23) and you cannot use the static STL (common), the only fix is to not call dlclose, or to stop using thread_local variables with non-trivial destructors.

      If your code does not need to run on devices older than API 23 you can link with -Wl,-z,nodelete, which instructs the linker to ignore dlclose for that library. You can backport this behavior by not calling dlclose.

      The fix in API 28 is the standardized inhibition of dlclose, so you can backport the fix to older versions by not calling dlclose.

    • Issue 988: Exception handling when using ASan via wrap.sh can crash. To workaround this issue when using libc++_shared, ensure that your application's libc++_shared.so is in LD_PRELOAD in your wrap.sh as in the following example:

      #!/system/bin/sh
      HERE="$(cd "$(dirname "$0")" && pwd)"
      export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
      ASAN_LIB=$(ls $HERE/libclang_rt.asan-*-android.so)
      if [ -f "$HERE/libc++_shared.so" ]; then
          # Workaround for https://github.com/android/ndk/issues/988.
          export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
      else
          export LD_PRELOAD="$ASAN_LIB"
      fi
      "$@"
      

      There is no known workaround for libc++_static.

      Note that because this is a platform bug rather than an NDK bug this cannot be fixed with an NDK update. This workaround will be necessary for code running on devices that do not contain the fix, and the bug has not been fixed even in the latest release of Android.

  22. 6c

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "26.2.11394342"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r26c-windows.zip
    660158794
    f8c8aa6135241954461b2e3629cada4722e13ee7
    
    macOS
    android-ndk-r26c-darwin.dmg
    1655206097
    9d86710c309c500aa0a918fa9902d9d72cca0889
    
    Linux
    android-ndk-r26c-linux.zip
    668556021
    7faebe2ebd3590518f326c82992603170f07c96e
    

    Changelog

    Report issues to GitHub.

    For Android Studio issues, follow the docs on the Android Studio site.

    If you're a build system maintainer that needs to use the tools in the NDK directly, see the build system maintainers guide.

    Announcements

    • KitKat (APIs 19 and 20) is no longer supported. The minimum OS supported by the NDK is Lollipop (API level 21). See Issue 1751 for details.
    • libc++ has been updated. The NDK's libc++ now comes directly from our LLVM toolchain, so every future LLVM update is also a libc++ update. Future changelogs will not explicitly mention libc++ updates.

    r26c

    • Updated LLVM to clang-r487747d. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • Issue 1928: Fixed Clang crash in instruction selection for 32-bit armv8 floating point.
      • Issue 1953: armeabi-v7a libc++ libraries are once again built as thumb.

    r26b

    • Updated LLVM to clang-r487747d. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • This update was intended to be included in r26 RC 1. The original release noted these fixes in the changelog, but the new toolchain had not actually been included.
      • Issue 1907: HWASan linker will be used automatically for minSdkVersion 34 or higher.
      • Issue 1909: Fixed ABI mismatch between function-multi-versioning and ifunc resolvers.
    • Issue 1938: Fixed ndk-stack to use the correct path for llvm-symbolizer and other tools.

    Changes

    • Updated LLVM to clang-r487747c. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • Clang now treats -Wimplicit-function-declaration as an error rather than a warning in C11 and newer. Clang's default C standard is 17, so this is a change in default behavior compared to older versions of Clang, but is the behavior defined by C99.

        If you encounter these errors when upgrading, you most likely forgot an #include. If you cannot (or do not want to) fix those issues, you can revert to the prior behavior with -Wno-error=implicit-function-declaration.

        C++ users are unaffected. This has never been allowed in C++.

        See https://reviews.llvm.org/D122983 for more details.

      • Issue 1298: Fixed seccomp error with ASan on x86_64 devices.

      • Issue 1530: Updated libc++ to match LLVM version.

      • Issue 1565: Fixed lldb ncurses issue with terminal database on Darwin.

      • Issue 1677: Fixed Clang crash in optimizer.

      • Issue 1679: Clang will now automatically enable ELF TLS for minSdkVersion 29 or higher.

      • Issue 1834: Fixed Clang crash during SVE conversions.

      • Issue 1860: Fixed miscompilation affecting armv7.

      • Issue 1861: Fixed front end crash in Clang.

      • Issue 1862: Fixed Clang crash for aarch64 with -Os.

      • Issue 1880: Fixed crash in clang-format.

      • Issue 1883: Fixed crash when incorrectly using neon intrinsics.

    • Version scripts that name public symbols that are not present in the library will now emit an error by default for ndk-build and the CMake toolchain file. Build failures caused by this error are likely a bug in your library or a mistake in the version script. To revert to the earlier behavior, pass -DANDROID_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS=ON to CMake or set LOCAL_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS := true in your Android.mk file. For other build systems, see the secion titled "Version script validation" in the build system maintainers guide.
    • [Issue 873]: Weak symbols for API additions is supported. Provide __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ as an option.
    • Issue 1400: NDK paths with spaces will now be diagnosed by ndk-build on Windows. This has never been supported for any OS, but the error message wasn't previously working on Windows either.
    • Issue 1764: Fixed Python 3 incompatibility when using ndk-gdb with -f.
    • Issue 1803: Removed useless strtoq and strtouq from the libc stub libraries. These were never exposed in the header files, but could confuse some autoconf like systems.
    • Issue 1852: Fixed ODR issue in linux/time.h.
    • Issue 1878: Fixed incorrect definition of WIFSTOPPED.
    • ndk-build now uses clang rather than clang++ when linking modules that do not have C++ sources. There should not be any observable behavior differences because ndk-build previously handled the C/C++ linking differences itself.
    • ndk-build now delegates C++ stdlib linking to the Clang driver. It is unlikely that this will cause any observable behavior change, but any new behavior will more closely match CMake and other build systems.

    Known Issues

    This is not intended to be a comprehensive list of all outstanding bugs.

    • Issue 360: thread_local variables with non-trivial destructors will cause segfaults if the containing library is dlcloseed. This was fixed in API 28, but code running on devices older than API 28 will need a workaround. The simplest fix is to stop calling dlclose. If you absolutely must continue calling dlclose, see the following table:

      Pre-API 23 APIs 23-27 API 28+
      No workarounds Works for static STL Broken Works
      -Wl,-z,nodelete Works for static STL Works Works
      No dlclose Works Works Works

      If your code must run on devices older than M (API 23) and you cannot use the static STL (common), the only fix is to not call dlclose, or to stop using thread_local variables with non-trivial destructors.

      If your code does not need to run on devices older than API 23 you can link with -Wl,-z,nodelete, which instructs the linker to ignore dlclose for that library. You can backport this behavior by not calling dlclose.

      The fix in API 28 is the standardized inhibition of dlclose, so you can backport the fix to older versions by not calling dlclose.

    • Issue 988: Exception handling when using ASan via wrap.sh can crash. To workaround this issue when using libc++_shared, ensure that your application's libc++_shared.so is in LD_PRELOAD in your wrap.sh as in the following example:

      #!/system/bin/sh
      HERE="$(cd "$(dirname "$0")" && pwd)"
      export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
      ASAN_LIB=$(ls $HERE/libclang_rt.asan-*-android.so)
      if [ -f "$HERE/libc++_shared.so" ]; then
          # Workaround for https://github.com/android/ndk/issues/988.
          export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
      else
          export LD_PRELOAD="$ASAN_LIB"
      fi
      "$@"
      

      There is no known workaround for libc++_static.

      Note that because this is a platform bug rather than an NDK bug this cannot be fixed with an NDK update. This workaround will be necessary for code running on devices that do not contain the fix, and the bug has not been fixed even in the latest release of Android.

  23. 6

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "26.0.10792818"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r26-windows.zip
    664790510
    7fcf5789bc248c130af675720353819f72b02b94
    
    macOS
    android-ndk-r26-darwin.dmg
    1655326729
    c1c5236686e0427978d0afba60f544383d27216b
    
    Linux
    android-ndk-r26-linux.zip
    668596633
    d3bef08e0e43acd9e7815538df31818692d548bb
    

    Changelog

    Report issues to GitHub.

    For Android Studio issues, follow the docs on the Android Studio site.

    If you're a build system maintainer that needs to use the tools in the NDK directly, see the build system maintainers guide.

    Announcements

    • KitKat (APIs 19 and 20) is no longer supported. The minimum OS supported by the NDK is Lollipop (API level 21). See Issue 1751 for details.
    • libc++ has been updated. The NDK's libc++ now comes directly from our LLVM toolchain, so every future LLVM update is also a libc++ update. Future changelogs will not explicitly mention libc++ updates.

    Changes

    • Updated LLVM to clang-r487747c. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • Clang now treats -Wimplicit-function-declaration as an error rather than a warning in C11 and newer. Clang's default C standard is 17, so this is a change in default behavior compared to older versions of Clang, but is the behavior defined by C99.

        If you encounter these errors when upgrading, you most likely forgot an #include. If you cannot (or do not want to) fix those issues, you can revert to the prior behavior with -Wno-error=implicit-function-declaration.

        C++ users are unaffected. This has never been allowed in C++.

        See https://reviews.llvm.org/D122983 for more details.

      • Issue 1298: Fixed seccomp error with ASan on x86_64 devices.

      • Issue 1530: Updated libc++ to match LLVM version.

      • Issue 1565: Fixed lldb ncurses issue with terminal database on Darwin.

      • Issue 1677: Fixed Clang crash in optimizer.

      • Issue 1679: Clang will now automatically enable ELF TLS for minSdkVersion 29 or higher.

      • Issue 1834: Fixed Clang crash during SVE conversions.

      • Issue 1860: Fixed miscompilation affecting armv7.

      • Issue 1861: Fixed front end crash in Clang.

      • Issue 1862: Fixed Clang crash for aarch64 with -Os.

      • Issue 1880: Fixed crash in clang-format.

      • Issue 1883: Fixed crash when incorrectly using neon intrinsics.

    • Version scripts that name public symbols that are not present in the library will now emit an error by default for ndk-build and the CMake toolchain file. Build failures caused by this error are likely a bug in your library or a mistake in the version script. To revert to the earlier behavior, pass -DANDROID_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS=ON to CMake or set LOCAL_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS := true in your Android.mk file. For other build systems, see the secion titled "Version script validation" in the build system maintainers guide.
    • [Issue 873]: Weak symbols for API additions is supported. Provide __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ as an option.
    • Issue 1400: NDK paths with spaces will now be diagnosed by ndk-build on Windows. This has never been supported for any OS, but the error message wasn't previously working on Windows either.
    • Issue 1764: Fixed Python 3 incompatibility when using ndk-gdb with -f.
    • Issue 1803: Removed useless strtoq and strtouq from the libc stub libraries. These were never exposed in the header files, but could confuse some autoconf like systems.
    • Issue 1852: Fixed ODR issue in linux/time.h.
    • Issue 1878: Fixed incorrect definition of WIFSTOPPED.
    • ndk-build now uses clang rather than clang++ when linking modules that do not have C++ sources. There should not be any observable behavior differences because ndk-build previously handled the C/C++ linking differences itself.
    • ndk-build now delegates C++ stdlib linking to the Clang driver. It is unlikely that this will cause any observable behavior change, but any new behavior will more closely match CMake and other build systems.

    Known Issues

    This is not intended to be a comprehensive list of all outstanding bugs.

    • Issue 360: thread_local variables with non-trivial destructors will cause segfaults if the containing library is dlcloseed. This was fixed in API 28, but code running on devices older than API 28 will need a workaround. The simplest fix is to stop calling dlclose. If you absolutely must continue calling dlclose, see the following table:

      Pre-API 23 APIs 23-27 API 28+
      No workarounds Works for static STL Broken Works
      -Wl,-z,nodelete Works for static STL Works Works
      No dlclose Works Works Works

      If your code must run on devices older than M (API 23) and you cannot use the static STL (common), the only fix is to not call dlclose, or to stop using thread_local variables with non-trivial destructors.

      If your code does not need to run on devices older than API 23 you can link with -Wl,-z,nodelete, which instructs the linker to ignore dlclose for that library. You can backport this behavior by not calling dlclose.

      The fix in API 28 is the standardized inhibition of dlclose, so you can backport the fix to older versions by not calling dlclose.

    • Issue 988: Exception handling when using ASan via wrap.sh can crash. To workaround this issue when using libc++_shared, ensure that your application's libc++_shared.so is in LD_PRELOAD in your wrap.sh as in the following example:

      #!/system/bin/sh
      HERE="$(cd "$(dirname "$0")" && pwd)"
      export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
      ASAN_LIB=$(ls $HERE/libclang_rt.asan-*-android.so)
      if [ -f "$HERE/libc++_shared.so" ]; then
          # Workaround for https://github.com/android/ndk/issues/988.
          export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
      else
          export LD_PRELOAD="$ASAN_LIB"
      fi
      "$@"
      

      There is no known workaround for libc++_static.

      Note that because this is a platform bug rather than an NDK bug this cannot be fixed with an NDK update. This workaround will be necessary for code running on devices that do not contain the fix, and the bug has not been fixed even in the latest release of Android.

  24. 6b

    Expand

    GitHub Release

    Downloads

    android {
        ndkVersion "26.1.10909125"
    }
    
    Platform
    Package
    Size (Bytes)
    SHA1 Checksum
    
    Windows
    android-ndk-r26b-windows.zip
    661624075
    17453c61a59e848cffb8634f2c7b322417f1732e
    
    macOS
    android-ndk-r26b-darwin.dmg
    1657011580
    c30bdbc77c5bae2faf912591611640ac4d3c2331
    
    Linux
    android-ndk-r26b-linux.zip
    669320864
    fdf33d9f6c1b3f16e5459d53a82c7d2201edbcc4
    

    Changelog

    Report issues to GitHub.

    For Android Studio issues, follow the docs on the Android Studio site.

    If you're a build system maintainer that needs to use the tools in the NDK directly, see the build system maintainers guide.

    Announcements

    • KitKat (APIs 19 and 20) is no longer supported. The minimum OS supported by the NDK is Lollipop (API level 21). See Issue 1751 for details.
    • libc++ has been updated. The NDK's libc++ now comes directly from our LLVM toolchain, so every future LLVM update is also a libc++ update. Future changelogs will not explicitly mention libc++ updates.

    r26b

    • Updated LLVM to clang-r487747d. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • This update was intended to be included in r26 RC 1. The original release noted these fixes in the changelog, but the new toolchain had not actually been included.
      • Issue 1907: HWASan linker will be used automatically for minSdkVersion 34 or higher.
      • Issue 1909: Fixed ABI mismatch between function-multi-versioning and ifunc resolvers.
    • Issue 1938: Fixed ndk-stack to use the correct path for llvm-symbolizer and other tools.

    Changes

    • Updated LLVM to clang-r487747c. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information.
      • Clang now treats -Wimplicit-function-declaration as an error rather than a warning in C11 and newer. Clang's default C standard is 17, so this is a change in default behavior compared to older versions of Clang, but is the behavior defined by C99.

        If you encounter these errors when upgrading, you most likely forgot an #include. If you cannot (or do not want to) fix those issues, you can revert to the prior behavior with -Wno-error=implicit-function-declaration.

        C++ users are unaffected. This has never been allowed in C++.

        See https://reviews.llvm.org/D122983 for more details.

      • Issue 1298: Fixed seccomp error with ASan on x86_64 devices.

      • Issue 1530: Updated libc++ to match LLVM version.

      • Issue 1565: Fixed lldb ncurses issue with terminal database on Darwin.

      • Issue 1677: Fixed Clang crash in optimizer.

      • Issue 1679: Clang will now automatically enable ELF TLS for minSdkVersion 29 or higher.

      • Issue 1834: Fixed Clang crash during SVE conversions.

      • Issue 1860: Fixed miscompilation affecting armv7.

      • Issue 1861: Fixed front end crash in Clang.

      • Issue 1862: Fixed Clang crash for aarch64 with -Os.

      • Issue 1880: Fixed crash in clang-format.

      • Issue 1883: Fixed crash when incorrectly using neon intrinsics.

    • Version scripts that name public symbols that are not present in the library will now emit an error by default for ndk-build and the CMake toolchain file. Build failures caused by this error are likely a bug in your library or a mistake in the version script. To revert to the earlier behavior, pass -DANDROID_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS=ON to CMake or set LOCAL_ALLOW_UNDEFINED_VERSION_SCRIPT_SYMBOLS := true in your Android.mk file. For other build systems, see the secion titled "Version script validation" in the build system maintainers guide.
    • [Issue 873]: Weak symbols for API additions is supported. Provide __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ as an option.
    • Issue 1400: NDK paths with spaces will now be diagnosed by ndk-build on Windows. This has never been supported for any OS, but the error message wasn't previously working on Windows either.
    • Issue 1764: Fixed Python 3 incompatibility when using ndk-gdb with -f.
    • Issue 1803: Removed useless strtoq and strtouq from the libc stub libraries. These were never exposed in the header files, but could confuse some autoconf like systems.
    • Issue 1852: Fixed ODR issue in linux/time.h.
    • Issue 1878: Fixed incorrect definition of WIFSTOPPED.
    • ndk-build now uses clang rather than clang++ when linking modules that do not have C++ sources. There should not be any observable behavior differences because ndk-build previously handled the C/C++ linking differences itself.
    • ndk-build now delegates C++ stdlib linking to the Clang driver. It is unlikely that this will cause any observable behavior change, but any new behavior will more closely match CMake and other build systems.

    Known Issues

    This is not intended to be a comprehensive list of all outstanding bugs.

    • Issue 360: thread_local variables with non-trivial destructors will cause segfaults if the containing library is dlcloseed. This was fixed in API 28, but code running on devices older than API 28 will need a workaround. The simplest fix is to stop calling dlclose. If you absolutely must continue calling dlclose, see the following table:

      Pre-API 23 APIs 23-27 API 28+
      No workarounds Works for static STL Broken Works
      -Wl,-z,nodelete Works for static STL Works Works
      No dlclose Works Works Works

      If your code must run on devices older than M (API 23) and you cannot use the static STL (common), the only fix is to not call dlclose, or to stop using thread_local variables with non-trivial destructors.

      If your code does not need to run on devices older than API 23 you can link with -Wl,-z,nodelete, which instructs the linker to ignore dlclose for that library. You can backport this behavior by not calling dlclose.

      The fix in API 28 is the standardized inhibition of dlclose, so you can backport the fix to older versions by not calling dlclose.

    • Issue 988: Exception handling when using ASan via wrap.sh can crash. To workaround this issue when using libc++_shared, ensure that your application's libc++_shared.so is in LD_PRELOAD in your wrap.sh as in the following example:

      #!/system/bin/sh
      HERE="$(cd "$(dirname "$0")" && pwd)"
      export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
      ASAN_LIB=$(ls $HERE/libclang_rt.asan-*-android.so)
      if [ -f "$HERE/libc++_shared.so" ]; then
          # Workaround for https://github.com/android/ndk/issues/988.
          export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
      else
          export LD_PRELOAD="$ASAN_LIB"
      fi
      "$@"
      

      There is no known workaround for libc++_static.

      Note that because this is a platform bug rather than an NDK bug this cannot be fixed with an NDK update. This workaround will be necessary for code running on devices that do not contain the fix, and the bug has not been fixed even in the latest release of Android.