Android studio doesn't recognize the running emulator

霸气de小男生 提交于 2019-12-03 04:43:39

问题


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.

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.

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?


回答1:


Disable and then Enable ADB Integration

In Android Studio go to

  1. Menu -> Tools
  2. Android
  3. Enable ADB Integration (should be checked, click to remove check)
  4. Enable ADB Integration (should not be checked, click to add check)

Run your app again. Emulator that was previously missing from Run dialog should be available to be selected upon which to run your app.




回答2:


Try to kill the adb server and restart it.

Locate your adb binary (linux/osx) or adb.exe (windows) and do:

adb kill-server
adb start-server

this should fix your problem

Even if your problem still not solved then Restart emulator.




回答3:


On Windows, running Android Studio with administrator permissions can help (in addition to restarting adb server).




回答4:


Unchecking the "Enable ADB " worked for me



来源:https://stackoverflow.com/questions/21540948/android-studio-doesnt-recognize-the-running-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!