如何运行反应原生的github项目

时间:2018-05-07 06:41:48

标签: react-native

我在执行react-native run-android

时遇到错误
error: 
Command `start` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.

1 个答案:

答案 0 :(得分:1)

在将package.json与其他目录(如android / ios)放在一起的根目录中,运行命令npm install。然后跑 react-native link(不强制要求,如果要链接第三方库,则需要)。然后运行react-native run-android(假设您没有sdk路径问题,并且您正在运行模拟器)。

这是启动git项目的最常用方法。如果您遇到其他问题,请告诉我。