首页 > 解决方案 > 如何在我的 Windows 上从克隆的 repo 运行 React-Native-Navigation v2 Playground?

问题描述

我已经克隆了 Wix RNN2 repo [Branch v2],但我不确定如何在我的模拟器上运行 Playground。

如果我只是运行npm run start,我会收到此错误:

> rm -rf ./lib/dist && tsc
'rm' is not recognized as an internal or external command,
operable program or batch file. 

Windows 无法识别该命令,因为它是 linux。

我尝试从 Android Studio 运行该应用程序,并在我的模拟器上显示:

无法从资产“index.android.bundle”加载脚本- 这是因为我没有 Metro Bundler 为我制作捆绑包。

无论如何,Wix RNN2 运行这个示例的正确方法是什么?

我有 VSCode、Expo、Android Studio 并且我的 android 构建对 Android 项目没有错误。

标签: android-studioreact-nativeadbreact-native-navigationwix-react-native-navigation

解决方案


按着这些次序:

1)git clone https://github.com/wix/react-native-navigation.git

2)cd react-native-navigation

3)npm install

4)npm start

5)open xcode


推荐阅读