从 Android Studio 重启 ADB
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22667030/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Restart ADB from Android Studio
提问by Angudroid
I previously developed on Eclipse and just migrated to Android Studio. Everything works fine, it's better and faster.
我之前是在 Eclipse 上开发的,然后才迁移到 Android Studio。一切正常,它更好更快。
I work on real device, and Android Studio recognizes it without issue.
我在真实设备上工作,Android Studio 可以毫无问题地识别它。
But when I disconnect and reconnect my device, it doesn't recognize my device anymore, I have to exit and restart Android Studio.
但是当我断开并重新连接我的设备时,它不再识别我的设备,我必须退出并重新启动 Android Studio。
I can't find a way to "Reset adb" like Eclipse Feature.
我找不到像 Eclipse 功能那样“重置 adb”的方法。
Can ADB be restarted from within Android Studio? If so, how?
可以从 Android Studio 中重新启动 ADB 吗?如果是这样,如何?
回答by AndyGable
What I usually do when I get this error is restarting the adb
server by typing in the command into Terminal
:
当我收到此错误时,我通常会adb
通过在以下命令中输入以下命令来重新启动服务器Terminal
:
adb kill-server
adb start-server
However this can be achieved in Android Studio. Clicking the Monitor
button you can launch the same program you have referenced from Eclipse.
但是,这可以在 Android Studio 中实现。单击该Monitor
按钮,您可以启动从 Eclipse 引用的相同程序。
If you do not see this you may need to update your Platform Tools
from the SDK Manager button.
如果您没有看到这一点,您可能需要Platform Tools
从 SDK Manager 按钮更新您的。
回答by luthor smith
that did trick for me thanks. resetting adb on android studio fixed my issue of ADB not responding. If you'd like to retry, then please manually kill "adb.exe" and click 'Restart'. spent 2 days trying look for solution to this
这对我有用,谢谢。在 android studio 上重置 adb 修复了我的 ADB 没有响应的问题。如果您想重试,请手动杀死“adb.exe”并单击“重新启动”。花了 2 天时间尝试寻找解决方案
回答by Raptor
Apart from the above working answer, the ADB can also be restarted during the restart of Android Studio ( File > Invalidate Cache / Restart > Just Restart ).
除了上述工作答案外,ADB 还可以在 Android Studio 重新启动期间重新启动(文件 > 使缓存无效/重新启动 > 仅重新启动)。
ADB is down for a reason, therefore a clean restart of Android Studio is suggested.
ADB 关闭是有原因的,因此建议重新启动 Android Studio。