Android Build Menu Error (Can't start ADB server)

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.

UnityEditor.Android.Command.RunWithShellExecute (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <09a970ae0311447c9749d65ec2409482>:0)

UnityEditor.Android.ADB.StartServer () (at <09a970ae0311447c9749d65ec2409482>:0)

UnityEditor.Android.ADB.Run (System.String[ ] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <09a970ae0311447c9749d65ec2409482>:0)

UnityEditor.Android.AndroidDeploymentTargetsExtension.GetKnownTargets (UnityEditor.DeploymentTargets.IDeploymentTargetsMainThreadContext context, UnityEditor.ProgressHandler progressHandler) (at <09a970ae0311447c9749d65ec2409482>:0)

UnityEditor.DeploymentTargets.DeploymentTargetManager.GetKnownTargets () (at C:/buildslave/unity/build/Editor/Mono/DeploymentTargets/DeploymentTargetManager.cs:50)

UnityEditor.Android.AndroidBuildWindowExtension+c__AnonStorey0.<>m__0 () (at <09a970ae0311447c9749d65ec2409482>:0)

System.Threading.ThreadHelper:ThreadStart()

I have the same problem. I asked this on a forum as well, but no replies, I really hope someone knows how to fix this.

i face the same problem too, please someone help us

so do I, any solution yet?

problem fixed here :

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.

Unity version: 2020.3.6f1

4 Likes

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.

https://stackoverflow.com/questions/65209225/adb-server-not-starting-in-unity

1 Like

My experience:

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.

Maire Maire Maire,
Onumae work aagi tholaya matingudu da kuthi

mmmmmm

ama da maire oru mairum work aga mattiku