首页 > 解决方案 > React-native 没有找到 Genymotion

问题描述

我安装了android studio,我配置了环境变量和所有东西,我安装了genymotion并创建了一个设备,但是react-native run-android在项目文件夹中运行会出现以下错误:

error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

请帮我解决这个问题。React-native 没有找到 Genymotion disositivo,在此链接中有更多详细信息:https ://pt.stackoverflow.com/questions/382115/react-native-n%C3%A3o-reconhece-genymotion

标签: androidreact-nativegenymotion

解决方案


它尝试通过设备的IP将模拟器连接到ADB。要检查设备的 IP,只需单击仿真器窗口,IP 地址在窗口的标题中。

没有终端将运行命令:

$ adb connect ip_of_your_emulator:5555

不久之后,运行:

$ adb devices

如果你的文件名出现在列表中,你的模拟器已经连接成功!

打开模拟器后,只需run-android在项目文件夹中运行本机即可。


推荐阅读