Android game projects often require a specific NDK release. Use the version declared by the project’s build scripts rather than automatically choosing the newest one.
Install through Android Studio
Open Settings → Languages & Frameworks → Android SDK → SDK Tools, enable NDK (Side by side), select Show Package Details, and choose the required version. Install CMake as well if the project uses it.
The command-line equivalent is:
1 | sdkmanager --list | grep 'ndk;' |
Side-by-side releases are normally placed under:
1 | $ANDROID_SDK_ROOT/ndk/VERSION |
Gradle projects should pin the version:
1 | android { |
Shell configuration
On current macOS versions, zsh normally reads ~/.zshrc. Add paths that match your installation:
1 | export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk" |
Reload the shell and verify:
1 | source ~/.zshrc |
Very old projects may require archived releases such as r10e. Prefer official Android archives, verify the checksum, and isolate the old toolchain because it does not include current compiler and security updates.