friendly guide explains the right versions to use, how to install them, and how to fix build errors caused by outdated or mismatched tools. Perfect for Unity mobile developers in 2025.
If youโre building Android games in Unity, your SDK, JDK, and NDK must match Unityโs supported versions.
Using the wrong version is the #1 cause of errors like:
- Unable to locate Android SDK
- Failed to build APK
- NDK not found
- JDK unsupported
- AAPT2 error
- Build Tools 33.x missing
This guide walks you step-by-step through how to update SDK, JDK, and NDK in Unity using the CORRECT versions for 2025.
โ What Are SDK, JDK & NDK (Quick Explanation)
Before updating, understand what each tool does:
SDK (Software Development Kit)
Contains Android platform files, build tools, ADB, platform-tools. Needed to compile & package APK.
JDK (Java Development Kit)
Required for Gradle. Unity uses JDK for signing & building Android apps.
NDK (Native Development Kit)
Needed for native plugins, IL2CPP builds, and ARM64 support.
๐ฅ Correct Versions for Unity (2024โ2025)
Unity provides recommended versions and they must be followed.
Unity 2021 LTS โ 2022 LTS
- JDK: OpenJDK 11
- SDK: Android SDK Tools 33.x
- NDK: 21.4.7075529
Unity 2023 LTS โ 2024 LTS
- JDK: OpenJDK 17 (built-in)
- SDK: Android SDK 33 / 34
- NDK: 23.1.7779620
๐ฅ Tip: Always use the Unity Hubโs built-in versions unless you need custom setup.
๐ฆ METHOD 1 โ Update SDK, JDK, NDK using Unity Hub (Recommended)
This is the easiest and safest way.
Step 1 โ Open Unity Hub
Go to Installs.
Step 2 โ Locate your Unity version
Click the 3 dots (โฆ) โ Add Modules
Step 3 โ Check these modules:
โ Android Build Support
โ Android SDK & NDK Tools
โ OpenJDK
Click Install.
- Unity Hub will install the exact compatible versions, including:
- Android SDK
- Android NDK
- OpenJDK
- Required build tools
Done!
Restart Unity and you are ready to build APK or AAB.
๐ฆ METHOD 2 โ Manually Updating SDK, JDK & NDK (Custom Setup)
Use this if:
- Unity Hub install is broken
- You want latest Android API
- You use custom Gradle plugins
โญ Step-by-Step Manual Setup
Step 1 โ Download the Required Tools
๐ Download JDK
Use the correct version for your Unity:
- JDK 11
- JDK 17 (for newer Unity)
Download from:
https://adoptium.net
๐ Download SDK
Install Android Studio โ It includes the full SDK.
Open:
Android Studio โ More Actions โ SDK Manager
Install:
- Android SDK Platform 33 & 34
- Build-Tools 33.x
- Platform-Tools
- Tools
๐ Download NDK
Inside Android Studio:
SDK Manager โ SDK Tools โ NDK (Side by side)
Install the supported version:
21.4.7075529 (Unity 2021โ2022)
23.1.7779620 (Unity 2023โ2024)
Step 2 โ Set Paths Manually in Unity
Go to:
Edit โ Preferences โ External Tools
Uncheck:
โ Use Embedded JDK
โ Use Embedded SDK
โ Use Embedded NDK
Now set paths:
JDK PATH Example
C:/Program Files/Eclipse Adoptium/jdk-17
SDK PATH Example
C:/Users/YourName/AppData/Local/Android/Sdk
NDK PATH Example
C:/Users/YourName/AppData/Local/Android/Sdk/ndk/23.1.7779620
Click Apply.
๐ฉ Fix Common Errors After Updating
โ โFailed to build APKโ
Solution:
Install Android Build Tools 33.x in SDK Manager.
โ โUnable to detect NDK versionโ
Solution:
Correct folder naming is required:
โฆ/ndk/21.4.7075529
โ โJDK unsupportedโ
Solution:
Unity 2023+ requires JDK 17.
โ โPackage not found: platforms;android-33โ
Solution:
Install Android API Level 33 in SDK Manager.
โ Gradle Error
Solution:
Delete the Gradle cache:
C:/Users/yourname/.gradle
Unity auto-rebuilds.
Using other NDK versions causes IL2CPP errors.
๐ Final Tips for Beginners
- Use Unity Hub โ best version compatibility
- Do NOT update SDK or NDK randomly
- Always match versions with your Unity release
- For Android 64-bit: enable ARM64 in Player Settings
- If errors appear, check Console โ top error (not the bottom)
- Following this guide ensures that you will build APKs & AABs without errors.
Comments (0)