Android Studio 无法识别正在运行的模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21540948/
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
Android studio doesn't recognize the running emulator
提问by Anthony
When I run my app from AndroidStudio 0.4.3 using Run
I see Choose Device
which has two sections choose a running device
or Launch Emulator
. I don't have a running emulator at the moment so I click the ...
to launch AVD manager and start an emulator. At this point I see that under choose a running device
the emulator I just launched shows up but its listed as offline
.
当我使用 AndroidStudio 0.4.3 运行我的应用程序时,Run
我会看到Choose Device
其中有两个部分choose a running device
或Launch Emulator
. 我目前没有正在运行的模拟器,所以我单击...
启动 AVD 管理器并启动模拟器。在这一点上,我看到在choose a running device
我刚刚启动的模拟器下显示出来,但它被列为offline
.
In the past the offline
status went away when the emulator was fully up and running. However, now I've noticed that when the emulator is launched fully, it no longer appears in choose a running device
.
过去offline
,当模拟器完全启动并运行时,状态就会消失。但是,现在我注意到当模拟器完全启动时,它不再出现在choose a running device
.
I feel like I'm always playing cat and mouse game with android studio picking up the emulator. Is there a better way to do this? Am I missing something?
我觉得我总是在用 android studio 拿起模拟器玩猫捉老鼠的游戏。有一个更好的方法吗?我错过了什么吗?
回答by Baker
Disable and then Enable ADB Integration
禁用然后启用ADB 集成
In Android Studio go to
在 Android Studio 中转到
- Menu -> Tools
- Android
- Enable ADB Integration (should be checked, click to remove check)
- Enable ADB Integration (should not be checked, click to add check)
- 菜单 -> 工具
- 安卓
- Enable ADB Integration(应该是勾选的,点击取消勾选)
- Enable ADB Integration(不应该勾选,点击添加勾选)
Run your app again. Emulator that was previously missing from Run dialog should be available to be selected upon which to run your app.
再次运行您的应用程序。以前在运行对话框中缺少的模拟器应该可供选择以运行您的应用程序。
回答by danijoo
Try to kill the adb server and restart it.
尝试杀死 adb 服务器并重新启动它。
Locate your adb binary (linux/osx) or adb.exe (windows) and do:
找到您的 adb 二进制文件 (linux/osx) 或 adb.exe (windows) 并执行以下操作:
adb kill-server
adb start-server
this should fix your problem
这应该可以解决您的问题
Even if your problem still not solved then Restart emulator.
即使您的问题仍未解决,请重新启动模拟器。
回答by Igor Lytvynenko
On Windows, running Android Studio with administrator permissions can help (in addition to restarting adb server).
在 Windows 上,以管理员权限运行 Android Studio 会有所帮助(除了重新启动 adb 服务器)。
回答by lancer025
Unchecking the "Enable ADB " worked for me
取消选中“启用 ADB”对我有用