- Home /
Unity android Unable to forward network traffic to device
Tried building to phone for testing today and am getting this error: and the 2 console error reports:
CommandInvokationFailure: Unable to forward network traffic to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
D:/androidsdk/platform-tools\adb.exe -s "4f0c7edb" forward "tcp:54999" "localabstract:Unity-com.maincharacter.test"
stderr[
error: cannot bind to socket: No error
error: cannot bind to socket: No error
]
stdout[
]
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.AndroidDevice.Exec (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidDevice.Forward (System.String pc, System.String device, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit)
UnityEditor.Android.PostProcessAndroidPlayer.UploadAndStartPlayer (System.String manifestName, System.String stagingArea, UnityEditor.Android.AndroidDevice device, System.String packageName, Boolean developmentPlayer, Boolean retryUpload)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (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.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.BuildPlayerWindow:BuildPlayerAndRun()
and:
Error building Player: CommandInvokationFailure: Unable to forward network traffic to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
D:/androidsdk/platform-tools\adb.exe -s "4f0c7edb" forward "tcp:54999" "localabstract:Unity-com.maincharacter.test"
stderr[
error: cannot bind to socket: No error
error: cannot bind to socket: No error
]
stdout[
]
I'm on Unity5 with android SDK rev 24.3.4. Any help here would be awesome. If you'll pardon the cliche, It was working fine yesterday.
I'm using Unity 2017.1.0xb3 on Linux. I'm getting the following error
CommandInvokationFailure: Unable to forward network traffic to device. Please make sure the Android SD$$anonymous$$ is installed and is properly configured in the Editor. See the Console for more details.
platform-tools/adb -s "DEVICE" forward "tcp:34999" "localabstract:Unity-com.package" stderr[ error: cannot bind listener: Address already in use ]
Unity is listening on port 34999. I've tried build settings, disable "Development Build" and "adb forward --remove-all" no effect. I'm using the latest android sdk tools (sdk-tools-linux-3859397.zip). I also tried tools_r25.2.5-linux.zip but got the same error.
Any idea's?
Thanks
Answer by aeroson · Oct 25, 2015 at 12:02 PM
Worked around it by disabling Development Build in Build Settings, Debug.Log* still works
Worked for me too after this started happening in 5.2.3. What have they done....
Same issue here, except that is not a fix. What if I want Development Build checked because I want to run the profiler?
Answer by androidrobotfactory · May 17, 2017 at 07:22 AM
I'm using Unity 2017.1.0xb3 on Linux. I'm getting the following error
CommandInvokationFailure: Unable to forward network traffic to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
platform-tools/adb -s "DEVICE" forward "tcp:34999" "localabstract:Unity-com.package" stderr[ error: cannot bind listener: Address already in use ]
Unity is listening on port 34999. I've tried build settings, disable "Development Build" and "adb forward --remove-all" no effect. I'm using the latest android sdk tools (sdk-tools-linux-3859397.zip). I also tried tools_r25.2.5-linux.zip but got the same error.
Any idea's?
Thanks
I am having the same issue, could you solve it in the meantime?
Answer by Xakiru · Sep 19, 2016 at 04:58 PM
Hi, Here is my fix :
Open Cmd with admin permissions and run this command:
netstat -a -o -n | find "54999"
This will show the id of the proccess let's say it shows :
TCP 0.0.0.0:54999 0.0.0.0:0 LISTENING 14824
Just write :
taskkill /F /PID 14824
To make sure everything is clean, you can run things manually before opening unity. :
I hope this helps someone. Thanks;adb forward --remove-all
adb -s "4f0c7edb" forward "tcp:54999" "localabstract:Unity-com.maincharacter.test"
Try this: https://youtu.be/bgYcJvL15$$anonymous$$o
Answer by darkoverlordofdata · Oct 07, 2015 at 07:09 PM
I get the same issue runing on Linux Mint when I use 'Build And Run'. If I only do the build, it generates the apk. When I manually install that apk, it works perfectly. I am also able to run 'cordova run android' in the same environment, and it works. I don't think its the SDK, it appears to me that the install fails and throws an invalid error message.
Answer by Thorny2000 · Jul 11, 2016 at 09:01 PM
I found updating to the latest JDK fixes the issue (and you can leave development build checked).
Remember to set the new path in Edit->Preferences->External Tools.
Also I found USB 3.0 ports won't work on my PC, has to be a USB 2.0. That is probably more down to the USB driver for my LG G3 though.