如何为我的React Native项目合并Android模拟器?

时间:2023-01-13 12:12:30

How would I use an Android emulator when I'm working on a project in React Native? Right now, I can successfully run an iOS emulator with no problems in my project. But when it comes to Android, whenever I run react-native run-android, I get an error that says I don't have an Android emulator.

当我在React Native中处理项目时,如何使用Android模拟器?现在,我可以成功运行iOS模拟器,在我的项目中没有任何问题。但是当谈到Android时,每当我运行react-native run-android时,我都会收到一条错误消息,说我没有Android模拟器。

I have BlueStacks (found it by Googling) on my Mac but not really sure what I should do with it.

我在我的Mac上有BlueStacks(由Googling找到),但不确定我该怎么做。

2 个解决方案

#1


1  

The react-native team has written a thorough guide that you can find here: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment

本土反应团队编写了一份完整的指南,您可以在这里找到:https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment

It is a bit technical to setup the android environement but you will need to install the android sdk, do some path modification and add a device (virtual or physical) inside of android studio.

设置android环境有点技术,但你需要安装android sdk,做一些路径修改并在android studio中添加一个设备(虚拟或物理)。

#2


0  

use adb command to watch ur android devices. open command line and type

使用adb命令来观看你的Android设备。打开命令行和类型

cd  c:/sdk/platorm-tools

adb devices

adb is loacted in sdk folder in platform-tools. if u have not any device use a android phone for check ur app. but enable u developer option in setting of android phone.

adb在platform-tools的sdk文件夹中被激活。如果你没有任何设备使用Android手机检查你的应用程序。但在设置Android手机时启用u开发者选项。

#1


1  

The react-native team has written a thorough guide that you can find here: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment

本土反应团队编写了一份完整的指南,您可以在这里找到:https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment

It is a bit technical to setup the android environement but you will need to install the android sdk, do some path modification and add a device (virtual or physical) inside of android studio.

设置android环境有点技术,但你需要安装android sdk,做一些路径修改并在android studio中添加一个设备(虚拟或物理)。

#2


0  

use adb command to watch ur android devices. open command line and type

使用adb命令来观看你的Android设备。打开命令行和类型

cd  c:/sdk/platorm-tools

adb devices

adb is loacted in sdk folder in platform-tools. if u have not any device use a android phone for check ur app. but enable u developer option in setting of android phone.

adb在platform-tools的sdk文件夹中被激活。如果你没有任何设备使用Android手机检查你的应用程序。但在设置Android手机时启用u开发者选项。