1. Download Development tools
Download CMake, Lldb, Android NDK, (tick means has been downloaded, unchecked tick and click on the lower right corner of the apply to download, minus means the download is incomplete or there is an update, then click on it can be checked and apply to download or update):
CMake is a compiler, similar to GCC, clang, and so on. Lldb is for debugging, something like GDB. Android Ndk is an android Native Develop kit,android Native Development Kit, NDK development must be a toolkit that provides jni.h and so on.
2. It is best to configure the Ndk_root and Path environment variables, for example, my configuration is as follows:
Variable name: ndk_root, Variable value: C:\Android\sdk\ndk-bundle//ndk path
Variable name: path, variable value:%ndk_root%//configuration to path, so that any place to open the cmd window, you can enter ndk-build and other commands
Once configured, you can open the cmd window, enter ndk-build directly, and if the output is as follows, the configuration is successful.
3. Create a new normal Android project, for example, I named Ndkdemo
Step: Open Android studio--> file--> new--> new project--> and then continue to next, finally finish, you can create a new normal Android project
4. In
Android Studio configures the NDK development environment