React Native无法启动模拟器 [英] React native failed to launch emulator

查看:593
本文介绍了React Native无法启动模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试测试使用React native创建的android应用时,我遇到了此错误

  info正在启动模拟器...错误无法启动模拟器.原因:未找到仿真器作为emulator -list-avds输出.警告请手动启动仿真器或连接设备.否则,应用程序可能无法启动. 

我在android studio中安装了模拟器(AMD版本).

我该如何解决这个问题

解决方案

在您的方案中,运行React Native应用程序之前,您需要使用Android Studio创建模拟器.您可以通过 2.点击创建虚拟设备 3.从设备列表中选择您的设备,然后单击下一步 4.从可用的版本列表中选择android os版本,然后单击下一步 5.最后,保留设备上的默认设置,然后单击完成

之后,您可以从AVD Manager窗口中查看可用的android模拟器设备列表.

*在运行您的react native应用程序之前,请确保已打开并从android studio运行android仿真器

之后,使用 react-native run-android

运行您的项目

While trying to test the android app am creating with React native, I run into this error

info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.

I have the emulator(the AMD version) installed in the android studio.

How can I solve this problem

解决方案

In your scenario before running react native application you need to create emulator using Android Studio. You can view official documentation about running application on device by here

Before running your project make sure you have installed adb drivers - More

First of all create AVD using Android Studio.

Open your project android folder using Android Studio.

1. Click AVD Manager from Android Studio
2. Click Create Virtual Device 3. Select your device from device list and click Next 4. Select the android os version from the available version list and click Next 5. On last keep default settings on device and click Finish

After that you can see your available android emulator device list from AVD Manager window.

* Before run your react native application make sure you have turn on and run the android emulator from android studio

After that run your project using react-native run-android

这篇关于React Native无法启动模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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