# \[SOLVED\] SDK, NDK, and JDK configuration for compiling Android (including Oculus Quest 2) for 26.2 and 27.2

**URL:** <https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, UE4-26, UE4-27\
**Created:** [June 21, 2022, 10:09pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171 "2022-06-21T22:09:59Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digitalp2k](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/digitalp2k/32/499599_2.png) [@Digitalp2k](https://forums.unrealengine.com/u/Digitalp2k)\
**Post date:** [June 21, 2022, 10:10pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/1 "2022-06-21T22:10:00Z")

</div>

I know this works for both 4.26.2 (for Oculus Quest 2) and for 4.27.2 (for Android). I know that the document states to use the Android Studio from 2020 and the script, but that did not work for me. I had a custom setup on different drives on different platforms and I used Android Studio for a co-current install for Unity. Install the following.

**SDK- 29.0.3**  
**NDK- 21.4.7075529**  
**OpenJDK - 13.0.2**  
**SDK API level - android-29**  
**NDK API level - android-29**

 ![UE Config](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/c/eac15419b31682bec26942f6900c83f98e6ee834.png)

For the SDK/NDK install the latest version of Android Studio (or whatever version you prefer/currently using).

Open the SDK Manager from the main screen.

 ![BasePic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/4/e541a0562b134c9879edf3af0ef09cdb2561bacd.png)

Take note of the Android SDK Location path, as that will determine where the downloaded software goes as well as where to point the UE SDK paths. Also note that with the above configuration, it shouldn’t matter what other NDKs/SDKs are downloaded, however if you run into issues, just clear out the other versions as a process of elimination. Also ensure that the Command Line tools are present per the documentation.

Also click Show Package Details in the lower right. This will allow to select the individual Build Tools and NDKs.

In the Build tools  
Check the box next to 29.0.3, it will queue for downloading.

 ![SDK pic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/6/4e60c8641834e3e3687a20b567107d429e271429.png)

Navigate down to NDK (side-by-side) and check the box next to 21.4.707.5529, it to will queue for downloading.

 ![NDK pic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/c/53c79bb74ecc003cc5e8a28fb49b493dc1247027.png)

Click Apply and the software will download and install in the Android SDK Location.

JDK 13 can be obtained at [OpenJDK archive](https://jdk.java.net/archive/)  
Download the zip, and you can drop it in the 'C:\Program Files\Java' folder or wherever, in the Java folder will require admin rights.

Inside of UE. Got to Edit \> Project Settings \> Android SDK.

The SDK path is the SDK Location, that can be copy and pasted.  
The NDK is a subfolder in the NDK location, **\ndk\21.4.7075529**  
The JDK path is the root folder of the OpenJDK download from above.  
SDK and NDK API levels are both **android-29**.

Packaging should work (I only tested with ASTC). Hope this helps!

---

<div class="post-metadata">

**Author:** ![VictorAA1985](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victoraa1985/32/88708_2.png) [@VictorAA1985](https://forums.unrealengine.com/u/VictorAA1985)\
**Post date:** [November 23, 2022, 9:30pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/2 "2022-11-23T21:30:51Z")

</div>

Hi! I am having a similar issue, but my issue is Unreal says only SDK version r25b is allowed, but I need to run the earlier version to install to my Quest. So I can package the game with SDK r25b, but the apk runs into an error, or I try to package with an earlier version of SDK and the packaging fails. Would you be able to help me with this?

---

<div class="post-metadata">

**Author:** ![VictorAA1985](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victoraa1985/32/88708_2.png) [@VictorAA1985](https://forums.unrealengine.com/u/VictorAA1985)\
**Post date:** [January 2, 2023, 8:13pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/3 "2023-01-02T20:13:40Z")

</div>

![Screenshot (4)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/e/a1e66703d030f2f11d67020e101f0f95b3c5dc4d.png)  
These are the settings that worked for me, if anyone is struggling!

---

<div class="post-metadata">

**Author:** ![Holytoast](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/holytoast/32/609123_2.png) [@Holytoast](https://forums.unrealengine.com/u/Holytoast)\
**Post date:** [January 8, 2023, 4:05pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/4 "2023-01-08T16:05:28Z")

</div>

Thx so much! Was really struggling to get 5.1 working. Your steps worked 1st time out! You’re a wizard.

---

<div class="post-metadata">

**Author:** ![VictorAA1985](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victoraa1985/32/88708_2.png) [@VictorAA1985](https://forums.unrealengine.com/u/VictorAA1985)\
**Post date:** [January 10, 2023, 1:16am UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/5 "2023-01-10T01:16:21Z")

</div>

Whoever wrote out the original post is the wizard, but you’re welcome!

---

<div class="post-metadata">

**Author:** ![404techmobile](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@404techmobile](https://forums.unrealengine.com/u/404techmobile)\
**Post date:** [September 21, 2023, 5:16pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/6 "2023-09-21T17:16:24Z")

</div>

Great, it worked for me. I had been trying for about 4 days to package the game.

---

<div class="post-metadata">

**Author:** ![shammi.seth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shammi.seth](https://forums.unrealengine.com/u/shammi.seth)\
**Post date:** [October 9, 2023, 3:59pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/7 "2023-10-09T15:59:05Z")

</div>

Hi should i be using andriod version 32 for quest, after june 2023 ?

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [October 9, 2023, 10:28pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/8 "2023-10-09T22:28:28Z")

</div>

Hi @shammi.seth [this doc](https://docs.unrealengine.com/5.3/en-US/android-development-requirements-for-unreal-engine/) should be kept up to date. Just be sure to select the correct engine version in the upper-left.

---

<div class="post-metadata">

**Author:** ![shammi.seth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shammi.seth](https://forums.unrealengine.com/u/shammi.seth)\
**Post date:** [October 10, 2023, 8:38am UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/9 "2023-10-10T08:38:56Z")

</div>

Still does not mention JDK version. i had to go down to version 11.

---

<div class="post-metadata">

**Author:** ![Digitalp2k](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/digitalp2k/32/499599_2.png) [@Digitalp2k](https://forums.unrealengine.com/u/Digitalp2k)\
**Post date:** [October 19, 2023, 7:49pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/10 "2023-10-19T19:49:55Z")

</div>

Sorry guys. This was from 2022 and was a fix for 4.2(6-7) well before the Google API requirement. For 5.X. I found that the Turnkey solution with JDK 17 in the JAVA PATH solves my issues (for both Quest 2 and Mobile). I will create a separate thread with that so that people can find it separately with key words.

---

<div class="post-metadata">

**Author:** ![AlexfromAhoy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlexfromAhoy](https://forums.unrealengine.com/u/AlexfromAhoy)\
**Post date:** [October 25, 2023, 12:05pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/11 "2023-10-25T12:05:40Z")

</div>

Hey any update on this? I’ve been trying for days to package the template VR project for Oculus Quest 2 - anyone have a latest update on the stack required? Can anyone be a hero and provide screenshots? I’m running a windows 10

---

<div class="post-metadata">

**Author:** ![AlexfromAhoy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlexfromAhoy](https://forums.unrealengine.com/u/AlexfromAhoy)\
**Post date:** [October 25, 2023, 12:06pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/12 "2023-10-25T12:06:41Z")

</div>

someone mentioned earlier about JDK 13.0.2 - from OpenJDK - are you saying that this didn’t work? And you had to use JDK 11? (I’m trying to package on UE5.3 for Quest 2)

---

<div class="post-metadata">

**Author:** ![Schweinzzzz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Schweinzzzz](https://forums.unrealengine.com/u/Schweinzzzz)\
**Post date:** [January 5, 2024, 8:48pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/13 "2024-01-05T20:48:40Z")

</div>

this works perfectly great, but i need the api 33 now. how to do that?

---

<div class="post-metadata">

**Author:** ![AuthorHarsh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/authorharsh/32/881307_2.png) [@AuthorHarsh](https://forums.unrealengine.com/u/AuthorHarsh)\
**Post date:** [January 8, 2024, 4:13pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/14 "2024-01-08T16:13:12Z")

</div>

Worked, Thanks

---

<div class="post-metadata">

**Author:** ![OSMGAMESSTUDIO](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OSMGAMESSTUDIO](https://forums.unrealengine.com/u/OSMGAMESSTUDIO)\
**Post date:** [March 14, 2024, 11:16am UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/15 "2024-03-14T11:16:38Z")

</div>

thanks man

---

<div class="post-metadata">

**Author:** ![Joshi.Alok](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Joshi.Alok](https://forums.unrealengine.com/u/Joshi.Alok)\
**Post date:** [October 23, 2024, 10:53am UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/16 "2024-10-23T10:53:08Z")

</div>

I have been facing these errors LogPlayLevel: Error: UAT: ERROR: Failed to find %ANDROID\_HOME%/build-tools subdirectory. Run SDK manager and install build-tools.  
PackagingResults: Error: Launch failed! Android build-tools directory not found

---

<div class="post-metadata">

**Author:** ![Koribian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/koribian/32/466049_2.png) [@Koribian](https://forums.unrealengine.com/u/Koribian)\
**Post date:** [January 27, 2025, 12:35pm UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/17 "2025-01-27T12:35:08Z")

</div>

run the setupandroid bat in \*:\Unreal-Engines\UE\_5.0\Engine\Extras\Android

---

<div class="post-metadata">

**Author:** ![Hungg\_Bui](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hungg\_Bui](https://forums.unrealengine.com/u/Hungg_Bui)\
**Post date:** [November 3, 2026, 9:38am UTC](https://forums.unrealengine.com/t/solved-sdk-ndk-and-jdk-configuration-for-compiling-android-including-oculus-quest-2-for-26-2-and-27-2/587171/18 "2026-11-03T09:38:17Z")

</div>

> [@Digitalp2k](#):
>
> JDK 13

Thank bro! It’s working with UE4.27 🙂 WOW 11/3/2026
