Quick answer: Preferences → External Tools → check the “Android NDK Installed with Unity (recommended)” box. Reinstall Android Build Support via Unity Hub if the path is empty. NDK version must match Unity’s expectation exactly — mismatched user NDKs cause every IL2CPP error in the book.
Build for Android. Spinner. “BuildPostprocessor.PostBuild error: NDK not found.” Or worse: minutes of compilation followed by a wall of IL2CPP linker errors. NDK mismatches are silently catastrophic.
The Symptom
Build fails with one of: “NDK directory does not exist,” “Failed to call 'arm-linux-androideabi-strip’,” or hundreds of undefined symbol errors during the libIl2CppCore link step.
What Causes This
Unity bundles a specific NDK version with each Unity LTS:
- Unity 2021 LTS: NDK r21d
- Unity 2022 LTS: NDK r23b
- Unity 2023+: NDK r25b
If External Tools points at a different version, or if the bundled NDK was never installed, builds fail. A common cause: developer pointed Unity at their own NDK from Android Studio (which is usually a newer version) thinking it would “just work.”
The Fix
Step 1: Use Unity-bundled NDK. Edit → Preferences → External Tools.
Android NDK Installed with Unity (recommended): ✓
Android JDK Installed with Unity (recommended): ✓
Android SDK Tools Installed with Unity (recommended): ✓
Gradle Installed with Unity (recommended): ✓
All four boxes ticked. Unity uses the versions it shipped, which match each other.
Step 2: Install if missing. If a box is greyed or paths are empty, the bundled tools were not installed. Open Unity Hub → Installs → gear icon next to your Unity version → Add Modules → check Android Build Support and its sub-modules: Android SDK & NDK Tools, OpenJDK. Install. Unity is now ready.
Step 3: Verify NDK version. Look at the External Tools NDK path. The path should contain a folder named like android-ndk-r23b. If yours is a major version off (r24 vs r23), Unity will fail at link time.
Native Plugin ABI Conflicts
If your project includes .so plugins (Firebase, AdMob, custom C++ code), each must be built for the ABIs you target (arm64-v8a, armeabi-v7a, x86_64). Mismatch shows as “dlopen failed: cannot locate symbol” on device or as a link failure.
Solution: Player Settings → Android → Other Settings → Target Architectures. Pick only architectures you have all plugins for. arm64 alone is fine for the Play Store.
Gradle vs Custom Build
If you ticked “Custom Main Manifest” or “Custom Gradle Properties” in Player Settings, the Gradle template files may reference NDK paths or versions. Check those template files for hardcoded paths and remove them or update.
Verifying
Build a fresh empty project for Android with all four bundled options ticked. If that fails too, the install is broken — reinstall via Unity Hub. If only your project fails, the issue is project-specific (custom Gradle, .so plugins, JNI sources).
“Bundled NDK matches the Unity LTS. Don’t override unless you know why. ABI filters match plugins.”
Related Issues
For asmdef errors, see asmdef circular. For IL2CPP marshaling, see IL2CPP marshaling.
Bundled tools. Right ABIs. Builds succeed.