Developing android ndk apps with vscode
- vscode
- vscode C/C++ Extension Pack
- vscode CMake Tools Extension
- CMake
- Android SDK
modify the environment variables in the CMakePresets.json file and replace them with your local environment.
"environment": {
"ANDROID_SDK_HOME": "D:/ProgramData/Android",
"CMAKE": "3.22.1",
"NDK": "27.0.11718014",
"SDK": "22"
...
}The file .vscode/c_cpp_properties.json should be in your directory
Android has removed gdb since ndk 23 and now uses lldb for debugging.
plugin CodeLLDB
the demo /data/local/tmp/HelloWorld may not have execute permissions.
use adb shell su -c chmod 777 /data/local/tmp/HelloWorld
refe