You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Unity Remote 5连接失败:CommandInvokationFailure错误及adb未检测到设备问题求助

Fixing "adb.exe: error: no devices/emulators found" for Unity Remote 5

Hey there, I’ve run into this exact issue before when setting up Unity Remote for Android testing—let’s walk through the most common fixes to get your device recognized:

Step 1: Enable USB Debugging on Your Phone

This is the #1 culprit for adb not seeing your device:

  • Open your phone’s Settings → go to About Phone → tap Build Number 7 times to unlock Developer Options.
  • Go back to Settings, find Developer Options, and toggle on USB Debugging.
  • On some devices (like Samsung, Xiaomi), you’ll also need to enable USB Debugging (Security Settings) or Install via USB to let adb communicate with your phone.

Step 2: Set the Correct USB Connection Mode

When you plug your phone into your PC, pull down the notification shade and make sure the connection mode is set to File Transfer (MTP)—charging-only mode won’t let adb detect your device.

Step 3: Verify adb Can See Your Device

Let’s check if adb itself is working properly:

  1. Open Command Prompt (CMD) on your PC.
  2. Navigate to your adb directory with this command:
    cd C:\Users\PNP-AIDG\AppData\Local\Android\sdk\platform-tools
    
  3. Run:
    adb devices
    
    • If your device shows up in the list, great—move to the next step.
    • If not, you need to install your phone’s official USB driver:
      • Head to your phone manufacturer’s website and download the USB driver for your specific model.
      • Install the driver, then unplug and re-plug your phone.

Step 4: Restart the adb Server

Sometimes adb gets stuck in a broken state—restart it with these commands:

adb kill-server
adb start-server

Run adb devices again to see if your device is now recognized.

Step 5: Configure Unity Remote 5 Correctly

  • On your phone, open Unity Remote 5 and make sure it’s connected to the same Wi-Fi network as your PC (if using wireless) or that the USB connection is active.
  • In Unity Editor, go to Edit → Project Settings → Editor.
  • Under the Unity Remote section, set Device to your phone’s model (if it appears in the dropdown) or select Any Android Device.

Step 6: Double-Check Unity’s SDK Path

  • Open Unity Hub, go to your installed Unity version, click the three dots → Add Modules to confirm Android Build Support, SDK, and JDK are properly installed.
  • In Unity Editor, go to Edit → Preferences → External Tools and verify that the Android SDK path points to C:\Users\PNP-AIDG\AppData\Local\Android\sdk—if not, update it to the correct location.

Final Troubleshoot Tip

If none of the above works, try restarting both your PC and phone. Sometimes a simple reboot clears up connection glitches that adb can’t handle.

内容的提问来源于stack exchange,提问作者Neowb

火山引擎 最新活动