Oculus Quest not being detected by Unreal Engine

FYI for others with this issue - you may need to set this even if your environment vars are correct.

My environment variables were all set correctly: (ANDROID_HOME, NDKROOT, JAVA_HOME). Android Studio set them up when installed… BUT Unreal did not see my Quest 2 until I manually set those values in the settings as you have suggested.
I literally just copy and pasted the values from my environment variables window to Unreal, then saved. Unreal instantly saw my Quest 2 after this, even without a restart.

Using Unreal 4.26.1 and latest Android studio as of 2021-03-26… sorry my computer is building shaders so can’t open Android Studio to verify version.