简体   繁体   English

将Google Glass注册为Android Studio上的设备

[英]Registering Google Glass as a device on Android Studio

I'm programming with Glass for the first time, and I'm pretty new to Android Studio as well. 我是第一次使用Glass进行编程,对于Android Studio来说我还是很新。 I can't figure out how to make Glass a device in Android Studio the way I could for my Android phone. 我不知道如何像我在Android手机上那样将Glass制成Android Studio中的设备。 There is precious little advice on the web about it, and even less with people using Android Studio. 网上几乎没有关于它的宝贵建议,使用Android Studio的人则更少。

I have followed the GDK startup docs, like enabling usb debugging on the Glass, as well as installing the SDK and GDK. 我关注了GDK的启动文档,例如在Glass上启用USB调试,以及安装SDK和GDK。

If your Glass is already set up and you've enabled USB debugging, Android Studio should just recognize Glass. 如果您的Glass已经设置好并且启用了USB调试,则Android Studio 应该可以识别Glass。

Note that once plugged in the first time, you should see "Trust this computer?" 请注意,第一次插入电源后,您应该会看到“信任这台计算机吗?”。 on the Glass unit. 在玻璃单元上。 You have to accept in order for USB debugging to work. 您必须接受才能使USB调试工作。 If you don't accept, it won't allow the connection from your computer. 如果您不接受,它将不允许您的计算机进行连接。

That said, things don't always work perfectly. 就是说,事情并不总是完美的。 If you don't see “Trust this computer?” on your Glass unit after enabling debug mode: 启用调试模式后,如果在Glass单元上看不到“是否信任此计算机?”:

  • try turning debug mode off and on again. 尝试关闭并再次打开调试模式。
  • try unplugging/re-plugging the USB cord. 尝试拔下/重新插入USB线。
  • try adb kill-server 试试adb kill-server
  • factory reset the Glass unit 恢复出厂设置的玻璃单元

You can type adb devices in a command prompt at any point to see which devices are connected. 您可以随时在命令提示符下键入adb devices ,以查看连接了哪些设备。 If adb has permission to access Glass, then Android Studio does, too. 如果adb有权访问Glass,那么Android Studio也可以。

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

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