Android Studio:未找到目标设备:为什么? [英] Android Studio: No target device found: Why?

查看:945
本文介绍了Android Studio:未找到目标设备:为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我第一次启动 Android Studio 打开现有项目,然后单击运行时,我收到错误消息运行应用程序时出错,找不到目标设备
我已插入三星并启用了 ADB调试。它可以通过 adb设备命令正确显示,并且 ADB shell可以正常工作。我没有高兴地尝试了 adb启动服务器。奇怪的是,如果我先启动调试应用程序,然后再运行运行,它可以正常工作,但是我不明白为什么需要执行此烦人的步骤。其他 StackOverflow 答案据说可以做编辑配置,但是没有显示建议的选项。我正在运行 AS V3.01 。有任何线索吗?

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?

推荐答案

我发现了我的问题。在Run-> EditConfigurations-> DeploymentTargetOptions下,我选择了 USB设备(我的手机是USB设备,对吗?)。但是,当我选择打开选择部署目标对话框时,一切都变得很顺利。另外,选中使用同一设备进行以后的发射会完全跳过对话框,一切都很好。

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.

这篇关于Android Studio:未找到目标设备:为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆