从 Android 模拟器运行 apk 文件时出现错误“找不到设备”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3422981/
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
Getting the error "device not found" when running a apk file from Android emulator
提问by Chiranjib
I am trying to install an apk filefrom command prompt but getting an error "Device not found".
我正在尝试从命令提示符安装 apk 文件,但收到错误“找不到设备”。
回答by Sephy
try "adb devices" first and see the list of devices connected.
If the phone does not appear, do this :
"adb kill-server" wait a few seconds then "adb start-server"
If the phone appears in the list but its name is ?????, you have an issue of permission.
If the phone appears fine, you might have an issue in your command. Then check the following :
首先尝试“adb devices”并查看连接的设备列表。
如果电话没有出现,请执行以下操作:
“adb kill-server”等待几秒钟然后“adb start-server”
如果电话出现在列表中但它的名称是?????,您有权限问题.
如果手机显示正常,则您的命令可能有问题。然后检查以下内容:
Is your phone in debugging mode?
Have you added the debuggable tag to the manifest of your application?
is the phone properly connected with the cable to your computer?
Have you done everything correctly on this page.
您的手机是否处于调试模式?
您是否已将 debuggable 标记添加到应用程序的清单中?
手机是否通过数据线正确连接到计算机?
您是否在此页面上正确完成了所有操作。
回答by Lanlan82
Fist turn on the emulator and then go to prompt and type:
拳头打开模拟器,然后进入提示并输入:
adb install yourfile
回答by Deepsy
Try adb devices If you don't see your simulator device in the list although its on, you probably have to start the server. Execute adb start-server. Then once the server is up again check for device by using adb devices command. Your device will be in the list Now try to install the application. After installatio the application will be available in the menu.
尝试 adb devices 如果您在列表中没有看到您的模拟器设备,尽管它已打开,您可能必须启动服务器。执行 adb start-server。然后一旦服务器再次启动,使用 adb devices 命令检查设备。您的设备将在列表中 现在尝试安装该应用程序。安装后,应用程序将在菜单中可用。