Reputation: 121
so I am currently building an android game, I installed the Android SDK and JDK files using Unity Hub and I want to try the game on my phone and downloaded Unity Remote 5, but when I try to play it in Unity, it just gives me this error;
CommandInvokationFailure: Unity Remote requirements check failed
C:\Users\PNP-AIDG\AppData\Local\Android\sdk\platform-tools\adb.exe forward tcp:7201 tcp:7201
stderr[
adb.exe: error: no devices/emulators found
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
UnityEditor.Android.ADB.Run (System.String[] command, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
And I just dont know how to fix this problem, anyone have any ideas?
Upvotes: 12
Views: 58043
Reputation: 1
Solved using usbc cable like that the cable who have = entrance and exit...not normal USB. After i have put the unity in the whitelist in antivirus, the antivirus or firewall can block the usb.
Tell me if work with this solutions. Cris.
Upvotes: -1
Reputation: 163
The issue in my case was, that apparently there was more than one device (although I only had connected one phone): the phone and an emulator.
This did the trick for me: https://forum.unity.com/threads/error-more-than-one-device-emulator-when-debugging-on-android-remote.1165682/
To sum it up:
C:\Program Files\Unity\Hub\Editor\YOUR_UNITY_VERSION\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe -s DEVICE_ID forward tcp:7201 tcp:7201
where DEVICE_ID is the string that shows when typing (something like RZ8U441Y00X)
C:\Program Files\Unity\Hub\Editor\YOUR_UNITY_VERSION\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe devices
Upvotes: 0
Reputation: 31
Try switching a USB cable. That's what solved the problem for me (though both charged the phone when plugged in, only one of them enabled tethering for some reason). You can check if your device (on Android) recognizes your computer by going to: Setting > Connection > Mobile Hotspot and Tethering If "USB tethering" isn't available, your device doesn't recognize your computer and you can try this fix.
Upvotes: 2
Reputation: 41
You'll also get this error if you're using Windows Subsystem for Android and you're running the emulator at the same time as your device is plugged in. So when Unity runs adb forward tcp:7201 tcp:7201
, adb returns "adb.exe: error: more than one device/emulator".
Disable WSA by "Windows Subsystem for Android Settings"➡️Turn Off.
Upvotes: 0
Reputation: 11
I found a solution to the problem, this is due to the lack of a USB driver on the phone, I searched for a long time which ones to install correctly, but in the end I came to PdaNet http://pdanet.co/install / by installing the version for a computer with a USB phone connected, I had the computer authorized using the phone, and it works! Hurray! Unity Remote now connects without problems.
Upvotes: 0
Reputation: 717
May be you not press "OK" when your device try get accept access to usb debug.
You can try:
cd 'C:\Program Files\Unity\Hub\Editor\2020.3.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools'
(or path to your Unity version).\adb.exe devices
.List of devices attached
41faf63b unauthorized
try on device setting 'usb debug' => set "off" and set "On" again.
Upvotes: 0
Reputation: 465
Try these steps in-order:
In Unity, go to Edit -> Project Settings -> Editor, and set the "Device" to "Any Android Device"
Plug-in your phone.
Switch the connection type to USB tethering.
Enable developer mode (if already ON then switch it OFF before plugging in your phone)
Enable USB debugging (if already ON then switch it OFF before plugging in your phone)
When you will turn on USB debugging your phone will ask to allow the connected PC to access the RSA, allow it.
Now, switch the connection mode to "USB for Transferring files/Android Auto", the phone will again ask to allow the computer to access the RSA, allow it.
In Unity, go to File -> Build Settings, then select your device (which will now be visible in the "Run Device" dropdown).
Now, open Unity Remote 5 on your device.
Hit play in Unity Editor.
It works for me! Hope this helps :)
Upvotes: 31
Reputation: 572
You have to intall the ADB drivers: https://adbdriver.com/downloads/
First make sure your phone is plugged in via USB and your pc has access right. Then make sure you have activated the USB Debugging Mode on your Android phone. To do so you need to enable the Developer Mode.
If this not working yet, you may have to install the Android SDK and Java and set their paths inside Unity.
More info here: https://docs.unity3d.com/Manual/UnityRemote5.html
And here: https://forum.unity.com/threads/solved-unity-remote-5-not-working.516092/
Upvotes: 1
Reputation: 387
I don't know how to fix it really for the time being but if you don't want to see this message again, go to PLAYER SETTINGS, editor, Unity remote, device, and select "NONE".
Upvotes: 9