简体   繁体   English

Adb设备可以看到我的手机,而Android Studio无法看到

[英]Adb devices sees my phone, Android Studio doesn't

I've recently changed the computer to MacBook Pro. 我最近将计算机更改为MacBook Pro。 In the Android Studio when I want to install the application (Select Deployment Target), I don't have any devices listed. 当我想要安装应用程序(选择部署目标)时,在Android Studio中,我没有列出任何设备。 Strange things are that when I type ADB devices to the terminal I have my device listed there (not offline, its properly attached.). 奇怪的是,当我在终端上键入ADB devices时,我在其中列出了我的设备(不是脱机的,其连接正确)。 After building .apk and again typing in terminal ADB install ... i was able to install my application. 构建.apk并再次输入终端ADB install ...我能够安装我的应用程序。 What should I do to make Android Studio sees my device properly? 如何使Android Studio正确看到我的设备? I've tried restarting everything, I've turned off and on all the programmer and debugging options inside the phone. 我尝试重新启动所有功能,然后关闭并打开手机中的所有programmer and debugging options Also it's not showing any Virtual Devices I've created. 而且它也没有显示我创建的任何虚拟设备。

I had a similar behaviour on a Windows machine: 我在Windows机器上有类似的行为:
adb devices was listing the devices while Android Studio was not able to see it. adb devices正在列出设备,而Android Studio无法看到它。
I've found out that the reason was that Android Studio was not able to find adb executable. 我发现原因是Android Studio无法找到adb可执行文件。 I've fixed it on my machine by adding [Path-to-android-sdk]\\platform-tools\\ folder to the PATH variable and restarting Android Studio. 通过将[Path-to-android-sdk]\\platform-tools\\文件夹添加到PATH变量并重新启动Android Studio,已将其固定在计算机上。

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

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