Erro “Unable to start ADB server” ao gerar um Build Unity Android

Hoje eu estava tentando criar um novo Build android para um dos meus jogos, e me deparei com o seguinte erro:

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.
  at UnityEditor.Android.Command.RunWithShellExecute (System.String command, System.String args, System.String workingdir, System.String errorMsg) [0x00060] in <59b231ad19bf42f6b72bf2546a9b9393>:0 
  at UnityEditor.Android.ADB.StartServer () [0x00013] in <59b231ad19bf42f6b72bf2546a9b9393>:0 
  at UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x0000b] in <59b231ad19bf42f6b72bf2546a9b9393>:0 
  at UnityEditor.Android.AndroidDeploymentTargetsExtension.GetKnownTargets (UnityEditor.DeploymentTargets.IDeploymentTargetsMainThreadContext context, UnityEditor.ProgressHandler progressHandler) [0x0001d] in <59b231ad19bf42f6b72bf2546a9b9393>:0 
  at UnityEditor.DeploymentTargets.DeploymentTargetManager.GetKnownTargets () [0x00001] in <4dfeb7acf9f44dd0adc2a4f68156471c>:0 
  at UnityEditor.Android.AndroidBuildWindowExtension+<>c__DisplayClass31_0.b__0 () [0x00002] in <59b231ad19bf42f6b72bf2546a9b9393>:0 

Depois de reiniciar o Unity algumas vezes, conectar e desconectar meu dispositivo Android e realizar algumas pesquisas na Internet, finalmente consegui resolver o problema.

O que estava causando ele era um conflito entre o ADB.exe do Xamarin para Visual Studio e o ADB.exe do Unity. Ao tentar criar um novo build Unity, ao mesmo tempo, eu tinha outra instância do Visual Studio aberta com um projeto em Xamarin.

Eu simplismente fechei o Visual Studio que estava com o projeto do Xamarin e então O BUILD voltou a FUNCIONAR! Eu consegui gerar o BUILD ANDROID pora meu Jogo do Unity novamente!

Então não se esqueça, quando for tentar gerar um build para Unity Android, NUNCA mantenha outra instância do Visual Studio com um projeto Xamarin aberto ao mesmo tempo. Se lembre disso e tudo irá funcionar como esperado!

Você já teve esse mesmo problema e esse artigo te ajudou? Por favor deixe um comentário!

Obrigado e nos vemos na próxima! Paz e uma Vida Longa e Próspera! 🖖

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *