expo cli 和 ADB 错误:无法连接到守护进程 [英] expo cli and ADB error: can not connect to daemon

查看:43
本文介绍了expo cli 和 ADB 错误:无法连接到守护进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Genymotion 模拟器 Google Pixel 3 在我的 PC(Win 10 64 位)上运行 expo CLI 和 ADB.

I am trying to get expo CLI and ADB working on my PC (Win 10 64bit) with the Genymotion emulator Google Pixel 3.

当我从 expo cli 在 android 设备/模拟器上运行时,我得到以下日志:

When I run "on android device/ emulator from expo cli" I get the following logs:

无法在 Android 上启动项目:运行 adb 时出错:未找到 Android 设备.请连接设备并按照此处的说明启用 USB 调试:https://developer.android.com/studio/run/device.html#developer-device-options.如果您使用 Genymotion,请转到 Settings -> ADB,选择Use custom Android SDK tools",并将其指向您的 Android SDK 目录.

Couldn't start project on Android: Error running adb: No Android device found. Please connect a device and follow the instructions here to enable USB debugging: https://developer.android.com/studio/run/device.html#developer-device-options. If you are using Genymotion go to Settings -> ADB, select "Use custom Android SDK tools", and point it at your Android SDK directory.

查看这张图片

我已经安装了最新版本的 Virtual Box、genymotion 模拟器,并在我的c: epos"中正确安装了 expo,当我从 expo cli 单击在模拟器上运行时,我收到了这个错误.sdk manager 已经安装在我的 c: 和 genymotion 设置中,我在 adb 中设置了这个路径:C:/Program Files/Genymobile/Genymotion",它显示这个文件夹是有效的.

I am already install latest verson of Virtual Box, genymotion emulator and properly install expo in my "c: epos" now when I click run on emulator from expo cli I get this error. sdk manager is already install in my c: and in genymotion settings I setup this path in adb : "C:/Program Files/Genymobile/Genymotion" and it's show this folder is valid.

推荐答案

由于当前计算机和模拟器没有连接而发生错误.

Error occurred because the current computer and emulator are not connected.

您是否按照错误中的描述设置了 Genymotion?

Did you set up the Genymotion as described in the error?

如果没有,请转到设置 -> ADB,选择使用自定义 Android SDK 工具" ->

If you hadn't, go to Settings -> ADB, select "Use custom Android SDK tools" ->

并将其指向您的 Android SDK 目录.

and point it at your Android SDK directory.

/Users/username/Library/Android/sdk

运行模拟器,点击开发者选项,开启USB调试,开启Wi-Fi to Cellular.

Run emulator, click developer options, enable USB debugging and enable Wi-Fi to Cellular.

运行 Genymotion Shell 并输入 devices list 以查找设备的 IP 地址.

Run the Genymotion Shell and type devices list to find the IP address of the device.

打开终端,输入adb connect deviceIp:5555.确保与 adb device 的连接正确.输入 adb usbadb tcpip 5555.

Open the terminal and enter adb connect deviceIp:5555. Make sure the connection to adb device is correct. Enter adb usb and adb tcpip 5555.

这篇关于expo cli 和 ADB 错误:无法连接到守护进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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