Android Studio中的AVD管理器不显示我的设备,但adb设备显示它。我是不是遗漏了什么明显的东西?


当前回答

Env - AS 3.3.2 Linux 4 (ubuntu)

in AS used menu Tools > Create desktop entry 

桌面文件内容-(注意该路径不包括Platform-tools)

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Android Studio
Icon=jetbrains-studio.png
Path=/home/rob/android-studio
Exec=sh -c ' /home/rob/android-studio/bin/studio.sh' 
StartupNotify=false
StartupWMClass=jetbrains-studio
OnlyShowIn=Unity;
X-UnityGenerated=true

注意SDK的位置。下面的平台工具“adb”将不会被桌面找到。上面的路径:

 $ which adb
/usr/local/src/android-sdk-linux/platform-tools/adb

在我的设置中,我的症状是任何终端都会列出设备OK,但AS中的工具栏按钮永远不会显示连接的设备…当我的手机通过USB线连接时,我看到的只有“没有设备”。

我的解决方案是在文件顶部添加正确的路径:

 ${AS_HOME}/bin/studio.sh ...

PATH=$PATH:/usr/local/src/android-sdk-linux/platform-tools:/usr/local/src/android-sdk-linux/tools

其他回答

尝试改变usb连接模式到midi设备。这对我很管用。

AVD管理器用于模拟器图像。它从不显示硬件。这适用于任何AVD管理器的使用:Eclipse, Android Studio等。

更新最后一个usb驱动程序

安装谷歌USB驱动

在Android Studio中,单击Tools > Android > SDK管理器。 单击“SDK工具”页签。 选择“谷歌USB驱动包”,单击“安装”。 继续安装包。完成后,驱动程序文件被下载到\extras\谷歌\usb_driver\目录中。

I recently had trouble with this, and regardless of what I did(restart adb, edit adb_usb.ini, restart computer+device+swap usb port, reinstall studio etc. etc.) I just couldnt get it to work, and could not even detect my device using 'adb devices'. Finally after about 2 hours of googling and testing, someone suggested switching to PTP instead of MTP on my device. When I did this I got a popup on my device asking me to allow my mac access and suddenly everything worked(had to restart studio for it to show up there as well though).

我现在可能会碰到这个线程,但它是谷歌搜索的第一个结果,我有很多麻烦找到这个问题的答案,所以我认为这应该作为一个解决方案添加。

Android Studio也没有在Windows上显示我的设备(三星Galaxy Alpha),直到我从三星支持页面下载并安装了Windows驱动程序。我不得不在设备上使用MTP连接模式。我还在第一次连接设备后确认了对计算机的授权。