- Home /
Cannot build an android game after updating unity.
I recently updated unity from version 5.2.1f1 to 5.3.1f1. Before the update, I could build games out without issue. After the update, I can no longer build the game. The build process will through an error at "Trying find an android device." (Yes, the typo is in the actual loading bar.) The Unity Remote App has stopped working with my computer. I have checked and all of the SDK file folders are set correctly. Why can I no longer build games out?
Edit: I have tried building with an empty project and I receive this error:
CommandInvokationFailure: Unable to list connected devices. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
C:/Program Files (x86)/Android/android-sdk\platform-tools\adb.exe devices
stderr[
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)
error: unknown host service
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
]
stdout[
List of devices attached
adb server is out of date. killing...
]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.ADB.Devices (UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit)
UnityEditor.Android.PostProcessAndroidPlayer.FindDevice ()
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.HostView:OnGUI()
Edit 2: I dug up the android sdk and adb and it appears that those files have issues, not unity. I do not know what is going on. Does anyone have any ideas?
Are there any console error(s) to speak of? If so be sure and post it/them.
Unfortunately I just turned off my computer (I'm typing this on a phone).
I think the error was something along the lines of "make sure the android sdk location is set."
I checked in the preferences and all of the folders were set already.
Answer by RLin · Feb 16, 2016 at 03:23 AM
I finally solved the issue after several hours. This is a problem with the Android ADB and not Unity.
By running the Windows Command Runner in the Android ADB folder, I found that there were multiple listeners to the ADB ports. I eventually found that this was caused by multiple instances of the ADB running. The other instances were preventing Unity from properly accessing the ADB.
If you ever have this problem: Open the task manager and search for tfadb.exe. End the process and try building the project again.
2 years later...
I can't find any tfadb.exe files active in the task manager. Any idea what could it be?
Thanks!
Check to make sure that the file path for the android sdk and jdk are correctly set up. Another possible issue: sometimes, the android sdk is too new and Unity doesn’t yet have support for it. You may have to download an older version of the Android sdk that unity does support in this case.
Your answer
Follow this Question
Related Questions
I am having trouble building the project for android (i can't build) 0 Answers
android SDK not running 0 Answers
Unity 2017.3.0f3 / Android SDK Tools incompatibility 0 Answers
Issue building my game for Android 0 Answers
Android app install size 2-3 times size of Apk, and Apk more than twice as big as size in Editor.Log 1 Answer