带有 React Native 的 Nox 模拟器 [英] Nox emulator with React Native

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

问题描述

我正在使用自定义 Android 模拟器 (Nox) 为 React Native 设置我的开发环境.

I'm setting up my development environment for React Native with a custom Android Emulator (Nox).

我按照本网站上的步骤操作:如何将 Android Studio 与 Nox App Player 连接

I followed the steps on this website: How to connect Android Studio with Nox App Player

但是当我输入:adb devices 它仍然什么都不显示.

But when I type: adb devices it still shows nothing.

因此,当我尝试使用 react-native run-android 运行我的应用程序时,它说没有运行 Android 模拟器.

So when I try to run my app with react-native run-android it says that there is no Android simulator running.

是否有我遗漏的内容或有相同问题的人?

Is there something I missed or someone with the same problem?

推荐答案

1.打开终端并输入adb connect 127.0.0.1:62001.输入 adb devices 以确保您的模拟器已连接.

1.Open terminal and type adb connect 127.0.0.1:62001. type adb devices to make sure your emulator is connected.

2.进入你的项目,输入react-native run-android --deviceId 127.0.0.1:62001,等待项目编译完成,你会看到一个红色的错误画面.

2.Go to your project, type react-native run-android --deviceId 127.0.0.1:62001, waiting for the project to finish compiling, and the you will see a red error screen.

3.打开developer menu,进入Dev Settings → Debug server host for device,假设你的本地ip是192.168.1.121,然后输入:192.168.1.121:8081

3.Open the developer menu, Go to Dev Settings → Debug server host for device, Assume your local ip is 192.168.1.121, then type: 192.168.1.121:8081

4.使用 developer menu 重新加载您的应用,然后关闭应用,然后重新打开它.

4.Use developer menu to reload your app,then close the app, and reopen it.

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

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