项目搭建

expo

npm install -g expo-cli
expo init demo
cd demo
npm start

react-native

brew install watchman
npm install -g react-native-cli react-native init demo cd demo react-native run-android

需要安装的工具:

Node.js

React Native Command Line

Android Studio/XCode

react-native --help 查看命令

android studio下载

https://developer.android.google.cn/index.html

命令行启动Android模拟器

emulate @模拟器的名字

emulator -avd 5 -gpu off

https://jingyan.baidu.com/article/e4d08ffdb4bd060fd2f60de6.html

https://blog.csdn.net/gabbzang/article/details/9393981

遇到 “ PANIC: Missing emulator engine program for 'x86' CPU.” 问题解决方法:

https://blog.csdn.net/SDF_crazy/article/details/85228452    (亲测有效)

https://blog.csdn.net/tao_sheng_yi_jiu/article/details/80469426

原文地址:https://www.cnblogs.com/em2464/p/12165624.html