Android Studio: No target device found: Why?

谁都会走 提交于 2019-12-23 19:32:09

问题


When I first start Android Studio opening an existing project, and click Run, I get the error message Error running app, No target device found. I have my Samsung plugged in and ADB debugging enabled. It correctly shows up with the adb devices command and ADB shell works fine. I tried adb start-server with no joy. Strangely, If I start 'Debug app' first and then 'Run' it works fine, but I don't understand why this annoying step is necessary. Other StackOverflow answers said to do "Edit Configurations" but that doesn't show the options suggested. I'm running AS V3.01. Any clue?


回答1:


I found my problem. Under Run->EditConfigurations->DeploymentTargetOptions, I selected USB Device (my phone is a USB device, right?). But noooo, when I select Open Select Deployment Target Dialog, everything is peachy. Also, checking Use same device for future launches bypasses the dialog entirely and all is good.




回答2:


  • Check USB connection. Might be device is not connected properly.

  • Enable USB debugging mode on Device How to enable USB debugging in Android?

  • Select your device in tool bar and click on play button(Run application).


来源:https://stackoverflow.com/questions/50414217/android-studio-no-target-device-found-why

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