Issue
I have installed Unity 2019.4 with the Android SDK/NDK. An ADB server cannot start with this error:
UnityEditor.Android.Command.RunWithShellExecute (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <303ae0e7a8d8441ab049e592bd1e2100>:0)
UnityEditor.Android.ADB.StartServer () (at <303ae0e7a8d8441ab049e592bd1e2100>:0)
UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <303ae0e7a8d8441ab049e592bd1e2100>:0)
UnityEditor.Android.AndroidDeploymentTargetsExtension.GetKnownTargets (UnityEditor.DeploymentTargets.IDeploymentTargetsMainThreadContext context, UnityEditor.ProgressHandler progressHandler) (at <303ae0e7a8d8441ab049e592bd1e2100>:0)
UnityEditor.DeploymentTargets.DeploymentTargetManager.GetKnownTargets () (at <7d90b28560b644ce87b8263efcc36eed>:0)
UnityEditor.Android.AndroidBuildWindowExtension+<>c__DisplayClass31_0.<SpawnFetchTargetsThread>b__0 () (at <303ae0e7a8d8441ab049e592bd1e2100>:0)
System.Threading.ThreadHelper:ThreadStart()
I tried running adb in the terminal but it could not start either. I have already made bypasses through in the windows firewall. It had this output:
* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
adb.exe: failed to check server version: cannot connect to daemon
I am using windows for this.
Solution
Assuming you have something else like Oculus Developer Hub installed, that may be conflicting with the Unity install.
What you need to do is copy adb.exe
, AdbWinApi.dll
, and AdbWinUsbApi.dll
from the Unity
Editor/Data/PlaybackEngines/AndroidPlayer/SDK/platform-tools
folder to wherever they are located in the conflicting program - in the case of Oculus Developer Hub:
C:/Program Files/Oculus Developer Hub/resources/bin
. Then, restart your computer to apply changes. Please note you may need to kill these processes in order to run them.
If this does not work, install the vanilla Android SDK, and copy the same files from the SDK/platform-tools folder to the location of the conflicting program. Restart your computer.
Answered By - coresdev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.