How do you connect your terminal with the Android emulator(你如何将你的终端与安卓模拟器连接起来)
问题描述
我已经尝试导航到 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???
推荐答案
- 通过键入
adb devices
列出所有连接的设备
- 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.
- 如果它有效,并且您的模拟器正在运行并且您的 USB 设备已连接使用:
adb shell
如果您只连接了设备.adb shell
if you only have device connected.adb -d shell
连接到 USB 设备.adb -d shell
to connect to an USB-Device.adb -e shell
连接到模拟设备.如果您有多个模拟器或 USB 设备,您可能希望使用:
adb -s
外壳 If you have more than one emulator or usb devices you might want to use:
adb -s <DEVICE> shell
注意:确保在您的环境中正确设置了 android-sdk 的路径.要快速检查,启动 shell 并输入
adb version
.如果该命令成功,您就设置好了.如果没有,请将/path/to/android-sdk/tools
和/path/to/android/platform-tools
添加到您的$PATH
环境变量.在 Windows 上,android sdk 通常位于C:Users<username>AppDataLocalAndroidsdk
.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 inC:Users<username>AppDataLocalAndroidsdk
.这篇关于你如何将你的终端与安卓模拟器连接起来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:你如何将你的终端与安卓模拟器连接起来


基础教程推荐
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01