Android NDK Documentation

repository·master·Indexed 25 days ago

https://github.com/android/ndk

A toolset for implementing Android applications using native-code languages such as C and C++. Includes information on building native code via ndk-build and CMake, JNI shared libraries, the bionic C library, and debugging native crashes and tombstones.

Tokens
424
Snippets
0
Records
5
Agent score
31%

What's inside Android NDK

  1. Overview of the Android Native Development Kit (NDK)

    master
    The Android NDK allows developers to include native code (C/C++) in Android application packages. This code is compiled as JNI (Java Native Interface) shared libraries (.so files), enabling high-performance execution and access to low-level system features.
  2. NDK Build Systems and Support

    master
    The NDK supports both ndk-build and CMake out of the box, which are integrated with Android Studio. For advanced users looking to extend or modify these systems, a Build System Maintainers Guide is available in the NDK source.
  3. Access NDK guides and API references

    master

    For practical implementation, use the official Android Developer documentation:

    • NDK Guides: Provides tutorials and instructions for:
      • Building native code.
      • Debugging and profiling.
      • High-Performance Audio.
      • Vulkan (Graphics).
      • Neural Networks.
    • NDK API Reference: Detailed documentation for all Android-specific APIs available to native code.
  4. Understand native crashes and tombstones

    master

    If your native application crashes, you can analyze the failure using Android OS debug documentation:

    • Crash dumps/tombstones: Provides an overview of how crash data is captured.
    • Common crashes: A detailed reference for understanding and diagnosing typical native crash scenarios.
  5. Debug C library (bionic) and dynamic linker issues

    master

    When working with the Android C library (bionic) or encountering issues loading shared libraries (.so files), refer to these resources:

    • Android bionic status: Tracks API availability across different Android releases and changes in behavior between API levels.
    • Android changes for NDK developers: Details important dynamic linker changes in various Android releases. This is critical if you are having trouble loading your .so files.
    • 32-bit ABI bugs: Documents known issues specifically affecting 32-bit code.