android studio 在我的 ubuntu 笔记本电脑上没有检测到我的设备 [英] android studio doesn't detect my device on my ubuntu laptop

查看:29
本文介绍了android studio 在我的 ubuntu 笔记本电脑上没有检测到我的设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 Ubuntu 笔记本电脑上运行来自 Android Studio 的应用程序.

I am trying to run an app from Android Studio on my Ubuntu laptop.

我已经开启了USB调试,但是还是不行.

I have enabled USB debugging, but it is still not working.

当我在 Android Studio 中按运行时,它没有检测到我的设备(LG G3 Lollipop).

When I press run in Android Studio, it does not detect my device (LG G3 Lollipop).

我找不到任何帮助:(

推荐答案

首先,

打开终端并执行以下操作:

Open terminal and do following:

  1. 执行 lsusb 命令以检查您的设备确实已连接.

  1. Do lsusb command to check your device is indeed connected.

执行 adb devices 以检查您的设备是否已连接,然后检测为处于 adb 模式.

Do adb devices to check if your device is connected then it is detected as in adb mode.

2.a.如果没有找到上面的命令,执行sudo apt-get install android-tools-adb,然后检查它是否被列出.

2.a. if the above command is not found, do sudo apt-get install android-tools-adb and then check if it is listed.

其次,将第 1 步和第 2 步的结果与您的问题一起发布,以帮助我们找到正确的解决方案.

Secondly, post results of step 1 and 2 with your question to help us in finding a correct solution.

疑难解答:

  1. 确保adb 模式处于启用状态.
  2. 确保您在连接到 ubuntu 系统时在设备中提示时选择了 Allow 选项.
  3. 这个来自一些过去的 LG 用户,尝试以PTP 模式而不是 MTP 模式连接您的设备,它出人意料地有效.
  4. 如果它仍然不起作用(很可能是您的情况),请尝试使用谷歌搜索.我通过按我感觉很幸运"进入此页面,您应该偶尔尝试感到幸运.第 3 步和第 4 步的来源
  1. Make sure adb mode in enabled.
  2. Make sure you have opted for Allow option when prompted for in your device upon connecting to your ubuntu system.
  3. This one is from some past LG users, Try connecting your device in PTP mode rather than MTP mode, it surprisingly works.
  4. If it atill doesn't work, (most likely your case), try googling. I landed upon this page by pressing I'M FEELING LUCKY, you should try to feel lucky once in a while. Source for step number 3 and 4

按照页面上提到的步骤操作:

follow the steps as mentioned upon page:

  1. 创建一个文件:/etc/udev/rules.d/70-android.rules.
  2. 写入:SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666" 到文件中.
  3. 通过sudo chmod a+rx/etc/udev/rules.d/70-android.rules
  4. 分配适当的权限
  5. 重启系统并重启udev.

作为故障排除的第二步(确保您再次从第 1 步开始进行故障排除,以防您在这一步失败)

As a second step of troubleshooting (make sure you again repeated troubleshooting from step1 in case you failed at this step)

再次,过程:

  1. 创建一个文件:/etc/udev/rules.d/51-android.rules.
  2. 写入:SUBSYSTEM=="usb", ATTR{idProduct}=="1004", MODE="0666" 到文件中.
  3. 通过sudo chmod a+rx/etc/udev/rules.d/70-android.rules
  4. 分配适当的权限
  5. 重启系统并重启udev.

这篇关于android studio 在我的 ubuntu 笔记本电脑上没有检测到我的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆