0

I have re-installed Unity 2022.1.20f1 after I did an update. However, I can no longer compile and Android Project for the Quest 2. It reports Android NDK not found or invalid. Please, fix it in Edit/Unit->Preferences->External Tools.

Here it tells me I am missing the Android NDK with a fixed path of C:\Program Files\Unity\Hub\Editor\2022.1.20f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK

And as you can see from the image below, There is no NDK folder. I have re-installed it twice. I installed another version of the Editor and the NDK folder does exist in it's respective location.

I have tried to use the NDK for the working Version but it reports anything other than 21.3.6528147 are not officially supported.

I am at my wits end and wondered if anybody else has had this issue?

Many thanks

Mark

enter image description here

Mark
  • 166
  • 1
  • 13

1 Answers1

1

Hello you need to install the android NDK separatly and then provide the new NDK folder path in the setting of Unity as well as the SDK of android folder path as well. You have 2 methodes to do so 1 : to just install install android studio with all the stuff I mentioned or 2: just install them one by one from the website NDK Installation

SDK Installation

SDK

NDK

thunderkill
  • 126
  • 5
  • Thanks thunderkill. I've now uninstalled and re-installed the editor. I've not done the above steps but about to. However, I ran the build and it's now reporting "UnityException: JDK not found". I will however try the above and see if it fixes it. – Mark Jan 16 '23 at 08:49
  • Please do watch this video it will provide a step by step solution [Unity Android Support: Setup, SDK & NDK & JDK & Gradle](https://youtu.be/rxdI3yr9cm8) – thunderkill Jan 16 '23 at 09:03
  • 1
    Thanks again thunderkill. I did a third install and this time the Java JDK installed and the build process started. It however failed at the end with Execution failed for task ':launcher:mergeReleaseNativeLibs'. I downloaded the NDK as you suggested and SDK tools. Unity complained there was not an SDK in that folder so I stuck with the existing one. I pointed the NDK to the new download and it reported NDK 25.1.8937393 detected. Unity requires NDK r21d (64-bit) (21.3.6528147). So I have to move on to the Video! It worked before out of the box! But not this month! Video, here we go – Mark Jan 16 '23 at 09:18
  • 1
    Ok, I finally got it working after the third install and setting my Project Settings for XR Plug-in Management to OpenXR and not Oculus. However, I'm giving you the upvote for the effort you put in and the link to the Video. – Mark Jan 16 '23 at 09:42