Report issues to GitHub.
For Android Studio issues, follow the docs on the Android Studio site.
32-bit Windows is no longer supported. This does not affect the vast majority of users. If you do still need to build NDK apps from 32-bit versions of Windows, continue using NDK r20.
For more information on this change within Android Developer tools, see the blog post on the topic.
macOS 10.8 is no longer supported as of r21b (r21 supports 10.8). macOS 10.15 requires that binaries be notarized, and notarization is only supported for binaries built for 10.9 or newer.
LLD is now available for testing. AOSP has switched to using LLD by default and the NDK will follow (timeline unknown). Test LLD in your app by passing -fuse-ld=lld
when linking. Note that Issue 843 will affect builds using LLD with binutils strip and objcopy as opposed to llvm-strip and llvm-objcopy.
The legacy toolchain install paths will be removed over the coming releases. These paths have been obsolete since NDK r19 and take up a considerable amount of space in the NDK. The paths being removed are:
In general this change should only affect build system maintainers, or those using build systems that are not up to date. ndk-build and the CMake toolchain users are unaffected, and neither are make_standalone_toolchain.py
users (though that script has been unnecessary since r19).
For information on migrating away from the legacy toolchain layout, see the Build System Maintainers Guide for the NDK version you're using.
The Play Store will require 64-bit support when uploading an APK beginning in August 2019. Start porting now to avoid surprises when the time comes. For more information, see this blog post.
Issue 1060: A macOS app bundle that is signed and notarized is now available for download from our wiki and our website. Note that because only bundles may use RPATHs and pass notarization, the traditional NDK package for macOS *cannot be notarized. The SDK will continue to use the traditional package as the app bundle requires layout changes that would make it incompatible with Android Studio. The NDK is not quarantined when it is downloaded via the SDK manager, so is curently allowed by Gatekeeper.
The SDK manager is currently the most reliable way to get the NDK for macOS.
Issue 1207: Fix fatal error in clang when building with -O2 on arm64.
Issue 1239: Fix network drive issues for clang.
Issue 1229: README.md turned back to ordinary file.
gdb-8.3/gdb/psymtab.c:316: internal-error: sect_index_text not initialized
._Atomic
type qualifier. Note that the C++ standard will likely mandate this breakage in the future. See P0943R4 for more details.APP_PLATFORM
to be corrupted for API 30+ with LP64 ABIs.Updated Clang and LLD to r365631.
-faddrsig
by default.LOCAL_ARM_NEON := false
in ndk-build or passing -DANDROID_ARM_NEON=false
to CMake.-O0
.-static-openmp
.Updated libc++ to r369764.
Updated make to 4.2.1.
-O
for more readable errors with parallel builds.abspath
now works properly with Windows drive letters, so if you‘re using the workaround similar to what’s found in the NDK samples, you‘ll need to either drop the workaround or make sure it’s only used prior to r21.Updated glibc to 2.17.
Updated gdb to 8.3.
Issue 885: For LLD+LLDB compatibility, the NDK build systems now pass -Wl,--build-id=sha1
instead of -Wl,--build-id
when using LLD. Note that the CMake toolchain does not have access to flags set in CMakeLists.txt, so using an explicit -fuse-ld=lld
instead of ANDROID_LD=lld
will produce output that cannot be debugged with Android Studio. Third-party build systems need to apply the workaround manually. For more details, see the Build System Maintainers Guide.
Fixed ndk-build to use Clang's default C++ standard version (currently C++14) when using libc++.
Removed the cxx-stl/system
module from ndk-build. The system STL is still available (for now, see Issue 744); only an implementation detail has been removed. If you were explicitly linking libstdc++ or importing cxx-stl/system
, remove that and ensure that APP_STL
is set to system
instead.
Issue 976: ndk-build and the CMake toolchain file now enable _FORTIFY_SOURCE
by default. See FORTIFY in Android for more details.
Added NDK_GRADLE_INJECTED_IMPORT_PATH
support to ndk-build. This is to support import of dependencies from AAR dependencies. See Issue 916 for more information.
Added NDK_MAJOR
, NDK_MINOR
, NDK_BETA
, NDK_CANARY
, and ndk-major-at-least
APIs to ndk-build. These can be used to check what version of the NDK you are using from within ndk-build (CMake already has equivalent APIs). The first three are integers, NDK_CANARY
is either true
or false
, and ndk-major-at-least
is a function that takes a single integer. For example, to check if your build is being performed with NDK r21 or newer:
# This check works even on pre-r21 NDKs. The function is undefined pre-r21, # and calling an undefined function in make returns the empty string, which # is not equal to "true", so the else branch will be taken. ifeq ($(call ndk-major-at-least,21),true) # Using at least NDK r21. else # Using something earlier than r21. endif
Note that because this API was not available before r21, it cannot be used to determine which NDK version earlier than 21 is being used.
Issue 1092: Fixed hiding of unwinder symbols in outputs of ndk-build and CMake. Maintainers of third-party build systems should apply similar fixes when using NDK r19 and above to guard against possible future compatibility 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 dlclose
ed on devices running M or newer, or devices before M when using a static STL. The simple workaround is to not call dlclose
.
Issue 70838247: Gold emits broken debug information for AArch64. AArch64 still uses BFD by default.
Issue 906: Clang does not pass -march=armv7-a
to the assembler when using -fno-integrated-as
. This results in the assembler generating ARMv5 instructions. Note that by default Clang uses the integrated assembler which does not have this problem. To workaround this issue, explicitly use -march=armv7-a
when building for 32-bit ARM with the non-integrated assembler, or use the integrated assembler. ndk-build and CMake already contain these workarounds.
Issue 906: Clang does not pass -march=armv7-a
to the assembler when using -fno-integrated-as
. This results in the assembler generating ARMv5 instructions. Note that by default Clang uses the integrated assembler which does not have this problem. To workaround this issue, explicitly use -march=armv7-a
when building for 32-bit ARM with the non-integrated assembler, or use the integrated assembler. ndk-build and CMake already contain these workarounds.
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/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 workaround will be necessary for this use case to work on all devices until at least Android R.
This version of the NDK is incompatible with the Android Gradle plugin version 3.0 or older. If you see an error like No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
, update your project file to use plugin version 3.1 or newer. You will also need to upgrade to Android Studio 3.1 or newer.
Issue 843: Using LLD with binutils strip
or objcopy
breaks RelRO.