React Native问题整理

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/binglingshuang/article/details/81202569

React Native问题整理

注意文件名大小写,区分大小写。

Unrecognized font family ionicons

Close the running packager
Run react-native link react-native-vector-icons
Then run react-native start --reset-cache
Finally run react-native run-ios to restart the simulator

No bundle URL present

参考:这里
1. 清除编译缓存 rm -f ios/build
2. 重新安装各种module rm -rf node_modules/ && yarn
3. 杀死原来的Metro 进程

sudo lsof -i:8081
kill -9 进程号

追加新的库后,需要进行如下操作

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.  4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.
展开阅读全文

没有更多推荐了,返回首页