Android NDK Revision Publisher's description
Will offer you the ability to call into native code from your Android applications
The Android NDK provides tools that allow Android application developers to embed components that make use of native code in their Android applications.
The Android NDK is a companion tool to the Android SDK that lets Android application developers build portions of their apps in native code. It is designed for use only in conjunction with the Android SDK, so if you have not already installed the Android 1.5 SDK, please do so before downloading the NDK.
The Native Development Kit comes with a series of cross-toolchains (compilers, linkers, etc..) that you can use to create native ARM binaries.
It provides a set of system headers for stable native APIs that are guaranteed to be supported in all later releases of the platform:
В· libc (C library) headers
В· libm (math library) headers
В· JNI interface headers
В· libz (Zlib compression) headers
В· liblog (Android logging) header
В· A Minimal set of headers for C++ support
The NDK also provides a build system that lets you work efficiently with your sources, without having to handle the toolchain/platform/CPU/ABI details. You create very short build files to describe which sources to compile and which Android application will use them вЂ” the build system compiles the sources and places the shared libraries directly in your application project.
Here are some key features of "Android NDK":
В· A set of tools and build files used to generate native code libraries from C and C++ sources
В· A way to embed the corresponding native libraries into application package files (.apks) that can be deployed on Android devices
В· A set of native system headers and libraries that will be supported in all future versions of the Android platform, starting from Android 1.5
В· Documentation, samples, and tutorials
What's New in This Release:Important changes:
- Added support for Android 4.3 (API level 18). For more information, see STABLE-APIS.html and new code examples in samples/gles3jni/README.
- Added headers and libraries for OpenGL ES 3.0, which is supported by Android 4.3 (API level 18) and higher.
- Added GNU Compiler Collection (GCC) 4.8 compiler to the NDK.
- Added Clang 3.3 support. The NDK_TOOLCHAIN_VERSION=clang build option now picks Clang 3.3 by default.
- Updated GNU Project Debugger (GDB) to support python 2.7.5.
- Added MCLinker to support Windows hosts. Since ld.gold is the default where available, you must add -fuse-ld=mcld in LOCAL_LDFLAGS or APP_LDFLAGS to enable MCLinker.
- Added ndk-depends tool which prints ELF library dependencies.
Important bug fixes:
- Fixed potential event handling issue in android_native_app_glue.
- Fixed ARM/GCC-4.7 build to generate sufficient alignment for NEON load and store instructions VST and VLD.
- Fixed a GCC 4.4.3/4.6/4.7 internal compiler error (ICE) for a constant negative index value on a string literal.
- Fixed GCC 4.7 segmentation fault for constant initialization with an object address.
- Fixed GCC 4.6 ARM segmentation fault for -O values when using Boost 1.52.0.
- Fixed libc.so and libc.a to support the wait4() function.
- Updated the x86 libc.so and libc.a files to include the clone() function.
- Fixed LOCAL_SHORT_COMMANDS bug where the linker.list file is empty or not used.
- Fixed GCC MIPS build on Mac OS to use CFI directives, without which ld.mcld --eh-frame-hdr fails frequently.
- Fixed Clang 3.2 X86/MIPS internal compiler error in llvm/lib/VMCore/Value.cpp.
- Fixed GCC 4.7 64-bit Windows assembler crash. (Error: out of memory allocating 4294967280 bytes).
- Updated ndk-gdb script so that the --start or --launch actions now wait for the GNU Debug Server, so that it can more reliably hit breakpoints set early in the execution path (such as breakpoints in JNI code)
- Fixed GDB crash when library list is empty.
- Fixed GDB crash when using a stepi command past a bx pc or blx pc Thumb instruction.
- Fixed MIPS gdbserver to look for DT_MIPS_RLD_MAP instead of DT_DEBUG.
- Fixed a circular dependency in the ndk-build script, for example: If A->B and B->B, then B was dropped from build.
Other bug fixes:
- Fixed the ndk-build script to enable you to specify a version of Clang as a command line option (e.g., NDK_TOOLCHAIN_VERSION=clang3.2). Previously, only specifying the version as an environment variable worked.
- Fixed gabi++ size of _Unwind_Exception to be 24 for MIPS build targets when using the Clang compiler. (Change 54141)
- Fixed the ndk-build script to ensure that built libraries are actually removed from projects that include prebuilt static libraries when using the ndk-build clean command. (Change 54461, Change 54480)
- Modified the NDK_ANALYZE=1 option to be less verbose.
- Fixed gnu-libstdc++/Android.mk to include a backward/ path for builds that use backward compability. (Issue 53404)
- Fixed a problem where stlport new sometimes returned random values.
- Fixed ndk-gdb to match the order of CPU_ABIS, not APP_ABIS. (Issue 54033)
- Fixed a problem where the NDK 64-bit build on MacOSX choses the wrong path for compiler. (Issue 53769)
- Fixed build scripts to detect 64-bit Windows Vista. (Issue 54485)
- Fixed x86 ntonl/swap32 error: invalid 'asm': operand number out of range. (Issue 54465, Change 57242)
- Fixed ld.gold to merge string literals.
- Fixed ld.gold to handle large symbol alignment.
- Updated ld.gold to enable the --sort-section=name option.
- Fixed GCC 4.4.3/4.6/4.7 to suppress the -export-dynamic option for statically linked programs. GCC no longer adds an .interp section for statically linked programs.
- Fixed GCC 4.4.3 stlport compilation error about inconsistent typedef of _Unwind_Control_Block. (Issue 54426)
- Fixed awk scripts to handle AndroidManifest.xml files created on Windows which may contain trailing \r characters and cause build errors. (Issue 42548)
- Fixed make-standalone-toolchain.sh to probe the prebuilts/ directory to detect if the host is 32 bit or 64 bit.
- Fixed the Clang 3.2 -integrated-as option.
- Fixed the Clang 3.2 ARM EHABI compact model pr1 and pr2 handler data.
- Added clang -mllvm -arm-enable-ehabi option to fix a clang error
- Header Fixes
- Modified headers to make __set_errno an inlined function, since __set_errno in errno.h is deprecated, and libc.so no longer exports it.
- Modified elf.h to include stdint.h. (Issue 55443)
- Fixed sys/un.h to be included independently of other headers. (Issue 53646)
- Fixed all of the MotionEvent_getHistorical API family to take the const AInputEvent* motion_event. (Issue 55873)
- Fixed malloc_usable_size to take const void*. (Issue 55725)
- Fixed stdint.h to be more compatible with C99. (Change 46821)
- Modified wchar.h to not redefine WCHAR_MAX and WCHAR_MIN
- Fixed declaration for pointer-related PRI and SCN macros. (Issue 57218)
- Changed the sys/cdefs.h header so that __WCHAR_TYPE__ is 32-bit for API levels less than 9, which means that wchat_t is 32-bit for all API levels. To restore the previous behavior, define the _WCHAR_IS_8BIT boolean variable. (Issue 57267)
- Added two flags to re-enable two optimizations in upstream Clang but disabled in NDK for better compatibility with code compiled by GCC
- Added a -fcxx-missing-return-semantics flag to re-enable missing return semantics in Clang 3.2+. Normally, all paths should terminate with a return statement for a value-returning function. If this is not the case, clang inserts an undefined instruction (or trap in debug mode) at the path without a return statement. If you are sure your code is correct, use this flag to allow the optimizer to take advantage of the undefined behavior. If you are not sure, do not use this flag. The caller may still receive a random incorrect value, but the optimizer will not exploit it and make your code harder to debug.
- Added a -fglobal-ctor-const-promotion flag to re-enable promoting global variables with static constructor to be constants. With this flag, the global variable optimization pass of LLVM tries to evaluate the global variables with static constructors and promote them to global constants. Although this optimization is correct, it may cause some incompatability with code compiled by GCC. For example, code may do const_cast to cast the constant to mutable and modify it. In GCC, the variable is in read-write and the code is run by accident. In Clang, the const variable is in read-only memory and may cause your application to crash.
- Added -mldc1-sdc1 to the MIPS GCC and Clang compilers. By default, compilers align 8-byte objects properly and emit the ldc1 and sdc1 instructions to move them around. If your app uses a custom allocator that does not always align with a new object's 8-byte boundary in the same way as the default allocator, your app may crash due to ldc1 and sdc1 operations on unaligned memory. In this case, use the -mno-ldc1-sdc1 flag to workaround the problem.
- Downgraded the event severity from warning to info if APP_PLATFORM_LEVEL is larger than APP_MIN_PLATFORM_LEVEL. The APP_PLATFORM_LEVEL may be lower than APP_PLATFORM in jni/Application.mk because the NDK does not have headers for all levels. In this case, the actual level is shifted downwards. The APP_MIN_PLATFORM_LEVEL is specified by the android:minSdkVersion in your application's manifest. (Issue 39752)
- Added the android_getCpuIdArm() and android_setCpuArm() methods to cpu-features.c. This addition enables easier retrieval of the ARM CPUID information. (Issue 53689)
- Modified ndk-build to use GCC 4.7's as/ld for Clang compiling.
- Added the following new warnings to the ndk-build script
- Added warnings if LOCAL_LDLIBS/LDFLAGS are used in static library modules.
- Added a warning if a configuration has no module to build.
- Added a warning for non-system libraries being used in LOCAL_LDLIBS/LDFLAGS of a shared library or executable modules.
- Updated build scripts, so that if APP_MODULES is not defined and only static libraries are listed in Android.mk, the script force-builds all of them. (Issue 53502)
- Updated ndk-build to support absolute paths in LOCAL_SRC_FILES.
- Removed the *-gdbtui executables, which are duplicates of the *-gdb executables with the -tui option enabled.
- Updated the build scripts to warn you when the Edison Design Group (EDG) compiler front-end turns _STLP_HAS_INCLUDE_NEXT back on. (Issue 53646)
- Added the environment variable NDK_LIBS_OUT to allow overriding of the path for libraries/gdbserver from the default $PROJECT/libs. For more information, see OVERVIEW.html.
- Changed ndk-build script defaults to compile code with format string protection -Wformat -Werror=format-security. You may set LOCAL_DISABLE_FORMAT_STRING_CHECKS=true to disable it. For more information, see ANDROID-MK.html
- Added STL pretty-print support in ndk-gdb-py. For more information, see NDK-GDB.html.
- Added tests based on the googletest frameworks.
- Added a notification to the toolchain build script that warns you if the current shell is not bash.
System Requirements:- A complete Android SDK installation (including all dependencies) is required.
- Android 1.5 SDK or later version is required.
- GNU Make 3.81 or later is required. Earlier versions of GNU Make might work but have not been tested
- The native libraries created by the Android NDK can only be used on devices running the Android 1.5 platform version or later. This is due to toolchain and ABI related changes that make the native libraries incompatible with 1.0 and 1.1 system images.
- For this reason, you should use native libraries produced with the NDK in applications that are deployable to devices running the Android 1.5 platform version or later. To ensure compatibility, an application using a native library produced with the NDK.
Program Release Status: Major Update
Program Install Support: Install and Uninstall