如何将您的终端与Android模拟器连接 [英] How do you connect your terminal with the Android emulator

查看:74
本文介绍了如何将您的终端与Android模拟器连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试导航到android工具文件夹并输入"adb shell"命令,但它似乎不起作用.我的终端似乎只识别命令的adb部分,并给我一条错误消息.我在做什么错了??

I have tried the navigate to the android tool folder and entering the "adb shell" command but it doesn't seem to work. My terminal seems only to recognize the adb part of the command and gives me an error message. What am I doing wrong???

推荐答案

  1. 通过键入 adb设备
  2. 列出所有已连接的设备
  1. List all connected devices by typing adb devices

检查是否列出了任何设备.如果不是,则可能要检查设备是否已连接和/或仿真器正在运行.

Check, if there are any devices listed. If not you may want to check that your device is connected and/or your emulator is running.

  1. 如果它可以正常工作,并且您正在运行仿真器并且已连接USB设备,例如:

  • adb shell (如果仅连接了设备).

    • adb shell if you only have device connected.

      adb -d shell 连接到USB设备.

      adb -e shell 连接到模拟设备.

      如果您有多个仿真器或USB设备,则可能要使用: adb -s< DEVICE>外壳

      If you have more than one emulator or usb devices you might want to use: adb -s <DEVICE> shell

      注意:确保在您的环境中正确设置了android-sdk的路径.要进行快速检查,请启动外壳并输入 adb版本.如果该命令成功执行,则说明您已完成设置.如果不是,请将/path/to/android-sdk/tools /path/to/android/platform-tools 添加到您的 $ PATH env变量.在Windows上,Android SDK通常位于 C:\ Users \<用户名> \ AppData \ Local \ Android \ sdk 中.

      Note: Make sure that the path to the android-sdk is properly set-up in your environment. To quickcheck, fire up a shell and type adb version. If that command succeeds, you're set up. If not, add /path/to/android-sdk/tools and /path/to/android/platform-tools to your $PATH env variable. On windows the android sdk is typically located in C:\Users\<username>\AppData\Local\Android\sdk.

      这篇关于如何将您的终端与Android模拟器连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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