android - Devices disconnecting during application installation through Android studio using new MACBOOK
问题描述
Have recently received a new Macbook upgrade at work and had to go through the whole installation process of all the IDE's etc that I use. Have not had this issue in the past, but since the install of Android studio, every time I try to run the project on to a physical device, the device disconnects during the installation process via ADB.
'Installation failed because the device "device name" disconnected'.
I am using the ADB supplied by the SDK tool, which is set in my home path.
USB debugging is set and file transfer is selected.
Before the test is run, I check the device list with 'adb devices' to ensure that it is in the list, which it is but after the error message, it is removed from this list.
My colleague who also upgraded, does not currently have this issue, so am assuming that there is not an issue due to the power required from the USB port, as the mac's are the same spec.
With this machine and the adapter that came with it, only usb 3.0 ports are available, but as I said, colleague has the same spec and no current issues.
- Turning off the Instant run
- Built, Cleaned, Rebuild
- Re-synced
- Cleaned project with gradle wrapper of the project
- Invalidated caches and restarted
- My project does contain special characters + colleague's is fine
- Tried multiple cables I know work
- Memory on the devices is not an issue
- Tried multiple devices that work for my colleague
- Using the correct build variant, one that also work for colleague
- Restarted ADB
'Installation failed because the device "device name" disconnected'.
解决方案
推荐阅读
- mysql - 组合两个选择语句(追加列)
- java-8 - 未能创建 ConnectionFactory 对象
- python - 在 Jupyter Notebook 中运行 Tornado 服务器
- apache-spark - 每个 avro 记录的 Apache Spark 字节大小
- xcode - Xcode 9.2 文件夹总是打开?
- arrays - “参数”关键字在 Javascript 中如何工作?
- java - FirebaseApp 初始化不成功 - 错误崩溃应用程序
- jquery - 禁用按钮第一次起作用,但按下一次后不起作用,我该如何解决?
- javascript - 如何将类从一个文件导出到 Node 中的另一个文件?
- android - 在 Android 中使用 webrtc 保存视频文件时遇到问题