Neowb
Neowb

Reputation: 121

CommandInvokationFailure: Unity Remote requirements check failed

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

Answers (9)

Eugen C. Settimo
Eugen C. Settimo

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

Meister der Magie
Meister der Magie

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

rotemp
rotemp

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

Ryan
Ryan

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

redflasher
redflasher

Reputation: 717

May be you not press "OK" when your device try get accept access to usb debug.

You can try:

  1. Press Win+R, type "cmd" and press "Enter"
  2. cd 'C:\Program Files\Unity\Hub\Editor\2020.3.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools' (or path to your Unity version)
  3. .\adb.exe devices.
  4. If you look like this:

List of devices attached
41faf63b unauthorized

try on device setting 'usb debug' => set "off" and set "On" again.

  1. Press "OK" on device.

Upvotes: 0

Harsh patel
Harsh patel

Reputation: 465

Try these steps in-order:

  1. In Unity, go to Edit -> Project Settings -> Editor, and set the "Device" to "Any Android Device"

  2. Plug-in your phone.

  3. Switch the connection type to USB tethering.

  4. Enable developer mode (if already ON then switch it OFF before plugging in your phone)

  5. 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.

  1. 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.

  2. In Unity, go to File -> Build Settings, then select your device (which will now be visible in the "Run Device" dropdown).

  3. Now, open Unity Remote 5 on your device.

  4. Hit play in Unity Editor.

It works for me! Hope this helps :)

Upvotes: 31

Pfinnn
Pfinnn

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

Achie1
Achie1

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

Related Questions