我像react-native run-ios --simulator="iPhone 8"
一样
运行iOS版React Native项目,因此它会自动运行特定的模拟器。
有没有办法为Android做同样的事情?
首次启动要在其中运行应用程序的模拟器。 使用终端,您可以通过以下命令启动:
模拟器 -AVD [AVD 名称]
然后只需运行react-native run-android --emulator="AVD-NAME"
命令即可。