Download the NDK and Tools
https://developer.android.google.cn/ndk/downloads/
To compile and debug native code for your app, you need the following components:
- The Android Native Development Kit (NDK): a set of tools that allows you to use C and C++ code with Android.
- CMake: an external build tool that works alongside Gradle to build your native library. You do not need this component if you only plan to use ndk-build.
- LLDB: the debugger Android Studio uses to debug native code.
You can install these components using the SDK Manager:
- From an open project, select Tools > Android > SDK Manager from the main menu.
- Click the SDK Tools tab.
- Check the boxes next to LLDB, CMake and NDK
- Click Apply, and then click OK in the next dialog.
- When the installation is complete, click Finish, and then click OK.