欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

react-native lecture 2

程序员文章站 2022-07-12 17:08:48
...
brew install node
brew install watchman

出现启动的 failed to load bundle(http://localhost:8080/index.bundle?platform…
解决:

react-native start --reset-cache
react-native run-ios

step 2
Mac 下安装react-native android

brew install node
brew install watchman
npm install -g react-native-cli

install java8

http://openjdk.java.net/install/
sudo apt-get install openjdk-8-jre
sudo apt-get install openjdk-8-jdk
也可以下载jdk8 dmg文件
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

启动的时候:

react-native start --reset-cache
react-native run-android

设置镜像:

http://npm.taobao.org
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global

npm config get registry
npm config get disturl