我在我的机器上创建了许多android模拟器。问题是,每当我使用' react -native run-android‘运行我的react本地项目时,即使已经打开了一个新的模拟器,也会打开一个新的模拟器。我更喜欢选择一个特定的仿真器,该仿真器在每次没有仿真器运行或其他仿真器正在运行时启动。有可能吗?如果是,是如何实现的?
发布于 2020-09-16 13:40:09
您可以使用以下命令执行此操作:
react-native run-android --emulator MyEmulatorName您可以通过以下命令获取Emulator名称:
adb devices // this should return like "emulator-5554"
adb -s emulator-5554 emu avd name //pass name returned in above command. You should be able to get your emulator name like "Phone_API_28" and you can pass that in first command.https://stackoverflow.com/questions/63913639
复制相似问题