简体   繁体   English

Oculus Quest 2 - Android 设备在 Macbook Pro 上的 Unity 上没有响应 - 确保 USB 调试已启用

[英]Oculus Quest 2 - Android Device is not responding on Unity on Macbook Pro - Make sure USB debugging has been enabled

I build my first VR app using unity.我使用 unity 构建了我的第一个 VR 应用程序。 I am getting the following error when trying to build and run on a connected Oculus Quest 2 device!尝试在连接的 Oculus Quest 2 设备上构建和运行时出现以下错误!

Android device is not responding. Android 设备没有响应。 Make sure USB debugging has been enabled and that the device has authorized this computer, Check your device.确保 USB 调试已启用并且设备已授权此计算机,检查您的设备。 in most cases there should be a small icon in the status bar telling you if the USB connection is up.在大多数情况下,状态栏中应该有一个小图标告诉您 USB 连接是否已启动。

I have tried many different ways to get this working, I am not able to figure this out, is there anything else I can try?我已经尝试了许多不同的方法来让它工作,我无法弄清楚这一点,还有什么我可以尝试的吗? I have listed down things I tried and config I have!我已经列出了我尝试过的东西和我拥有的配置!

  • I have developer mode ON.我打开了开发者模式。
  • When I connect USB to Macbook Pro I do get an option to Allow in oculus quest with the following message and I select "Allow":当我将 USB 连接到 Macbook Pro 时,我确实获得了允许在 oculus quest 中使用以下消息的选项,并且我 select “允许”:

Allow Access to data, the connected device will be able to access files on this headset.允许访问数据,连接的设备将能够访问此耳机上的文件。 [Deny] [Allow] [否认允许]

  • I see my Oculus quest device in the "Run Device" dropdown in build settings and have it selected.我在构建设置的“运行设备”下拉菜单中看到了我的 Oculus 任务设备,并选择了它。
  • I also installed Android File Transfer and I do see all folders and files on the quest 2 device.我还安装了Android 文件传输,我确实看到了 quest 2 设备上的所有文件夹和文件。
  • I tried a factory reset and restarting the quest 2 device and my MacBook pro multiple time.我尝试恢复出厂设置并多次重新启动 quest 2 设备和我的 MacBook Pro。
  • App I have built runs fine when I click the play button and also it works when I build for the macOS and run on Macbook pro.当我点击播放按钮时,我构建的应用程序运行良好,当我为 macOS 构建并在 Macbook pro 上运行时它也可以正常工作。

Screen shot for the settings and error File > Build Settings设置和错误文件 > 构建设置的屏幕截图

在此处输入图像描述

Thank you!谢谢!

I am also developing Quest with Macbook, on Mac OS Unity, you have to install it via terminal with below command.我也在使用 Macbook 开发 Quest,在 Mac OS Unity 上,您必须使用以下命令通过终端安装它。

adb install -r /Users/username/Documents/yourProjects/your.apk

Otherwise, you have to install bootcamp Win10 for debugging via Quest Link mode.否则,您必须安装 bootcamp Win10 才能通过 Quest Link 模式进行调试。

It is working after I installed the android platform tools.在我安装了 android 平台工具后,它就可以工作了。

  1. Install android-platform-tools安装安卓平台工具
brew install android-platform-tools
  1. Reconnect the USB to Oculus Quest 2 device, this time in oculus I got 2 confirmation boxes.将 USB 重新连接到 Oculus Quest 2 设备,这次在 oculus 中我得到了 2 个确认框。 One of them has my laptop address and also the checkbox to remember.其中一个有我的笔记本电脑地址以及要记住的复选框。 I selected Allow.我选择了允许。

  2. After that File > Build and Run is now working all fine!之后File > Build and Run现在一切正常!

It required to have other updates to the settings but after I installed adb I did get the 2 confirmations in the quest when I connected and now the build and run functionality works all fine!它需要对设置进行其他更新,但是在我安装 adb 后,我在连接时确实得到了 2 个确认,现在构建和运行功能一切正常!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM