So I’ve been working on an android game in an outdated version of Unity (2017.2.4p1) and I have had no problems building the game and installing the APK on my phone and several other places. Well, I decided to update to 2019.2.2f1, and now every time I even go to the build settings page, I get an error that the SDK isn’t installed (see below). I’ve installed JDK, SDK, and NDK through Unity Hub, but I’m still having the problem. Could really use some help!
Here’s the console log:
CommandWithNoStdoutInvokationFailure: Unable to start ADB server. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
The problem for me was that the Unity-installed Android SDK was somehow conflicting with the one installed by Android Studio. To fix it, I simply went to Preferences in my Unity project and set the Android SDK path to C:\Users$USER\AppData\Local\Android\Sdk. I left the other paths to the defaults (Unity-installed versions) and it worked.
This is an older thread, but since it shows up in search results, I also suggest checking out the selected answer written by @coresdev on Stack Overflow. It’s similar to what @SakoDaemon above has mentioned regarding conflicting Android SDKs.
I’m using Unity 2020.3.32f1, on Linux. I was unable to run the project on Unity Remote on Android device. Each time I tried it I got the following error message in Unity Editor Console:
Because I have other versions of Android SDK I thought some running ADB instance may be causing the problem. So I went to /home/mika/Unity/Hub/Editor/2020.3.32f1/Editor/Data/PlaybackEngines/AndroidPlayer/SDK/platform-tools and tried to run ./adb devices resulting in Permission denied error.
For some reason, the adb binary, installed seconds ago by Unity Hub, had no execution bit set in permissions. So I added the missing execution bit in file properties dialog, and tries again with ./adb devices
Once that worked and my test device got correctly listed, Unity Editor was able to run the project on Unity Remote.