Download

Issues with ndk directory while setting up the oculus quest 2 with UE 4.26/4.25

Hi. I tried setting up UE 4.26 for the oculus quest 2 but kept getting a black screen and errors re: materials/pokeaholematerial and so dropped down to UE 4.25 where sometime last year I did have a quest working with UE 4.25.

But now I can’t get the quest 2 working with 4.25 and it’s failing at the end of launching saying it can’t locate the platform directory in ndk-bundle (which I now am wondering if that is also why it failed with UE 4.26). I’m on a mac and the location of the ndk in the Android SDK in UE is Library/Android/sdk/ndk-bundle/. There is no platform directory in ndk-bundle, but I eventually found platform in the location - /Users/jeromegoldstein/Library/Android/sdk/ndk/21.1.6352462 - and replaced the ndk-bundle path with the 21.1.635… path but Unreal wouldn’t even launch when I put that path into the NDK location.

I had forgot about this link https://www.unrealengine.com/en-US/t…al-engine-4-25 and it goes through the process of installing Android Studio and setup. I have a few questions about this:

  1. The link above specifically refers to using Android Studio 3.5.3 and going to the Android Studio archive and downloading it. I’ve just been randomly updating Android Studio over the last little while and am up to 4.1.2. My next step was going to be to uninstall Android Studio and install 3.5.3, which I guess would make sense.

  2. I went back to check if I had run SetupAndroid.command properly but I don’t think it executed correctly as per the execution below:

~ % /Users/Shared/Epic\ Games/UE_4.25/Engine/Extras/Android/SetupAndroid.command ; exit;
Android Studio Path: /Applications/Android Studio.app
Android Studio SDK Path: /Users/xxxxxx/Library/Android/sdk
/Users/Shared/Epic Games/UE_4.25/Engine/Extras/Android/SetupAndroid.command: line 45: : ==: unary operator expected
Warning: File /Users/jxxxxxxxxxx.android/repositories.cfg could not be loaded.
=======================================] 100% Computing updates…
Success!
Saving session…
…copying shared history…
…saving history…truncating history files…
…completed.
[Process completed]

Not sure what the issue is with the unary operator and line 45 and also why repositories.cfg could not be loaded.

I’m a bit stuck - it’s also not that simple to uninstall android studio and start over again, so if anyone has any advice would be great.

Thx

update:

if anyone is having the same problem - i reinstalled 4.25 and deleted android stuido 4.2.1 off my system following this link https://howchoo.com/macos/how-to-completely-uninstall-android-studio-on-macos-and-os-x. I then reinstalled Android studio 3.5.3 as per the Unreal docs. I then ran the SetupAndroid.Command file and reinstalled java. This seemed to work for 4.25 and have the project running on the quest 2…

I tried again in 4.26 - this time there were no errors re: being unable to find materials like materials/pokeaholematerial, etc. but there was still the black screen after the device launched. One thing I didn’t do for 4.26 was run the SetupAndorid.Command again, like was done for 4.25 - don’t know if that needs to be done for each engine version.

Thx