No Devices Found (Android)


I want to test my game without packaging it, right on my Android phone (Xiaomi Mi A2, 8.1.0).
I’ve installed Android SDK, Android NDK, JDK and Apache Ant. Here’s my environment variables:

User Variables:

ANDROID_HOME D:\Programs\AndroidSDK

ANT_HOME D:\Programs\ApacheAnt\bin

JAVA_HOME D:\Programs\Java\JRE

NDKROOT D:\Programs\AndroidNDK

PATH D:\Programs\Java\JRE\bin

System Variables:

PATH D:\Programs\AndroidSDK\tools\tools; D:\Programs\AndroidSDK\tools\tools\bin; D:\Programs\AndroidSDK\tools\platform-tools

My device is connected to my PC and I’ve enabled developer mode on my phone.

adb devices
I see my phone, but alas, UE4 is not seeing it.
I’ve also tried adding those paths to Project Settings and removing them, restarting UE4, but nothing seems to be working.

Please, what to do?

Ok, turns out I’ve been using wrong JDK.
Thanks to Unity that told me where to find everything I need for android and automatically set everything as needed.