React Native 编译 jitsi-meet 开源项目在模拟器上的坑
报错1:Error: ENOSPC: System limit for number of file watchers reached
修改系统监控文件数
的Ubuntu
sudo gedit /etc/sysctl.conf
在底部添加一行
fs.inotify.max_user_watches=524288
然后保存并退出!
sudo sysctl -p
解决!
报错2:Unable to load script.Make sure you are either running a Metro server or that your bundle ‘index.android.bundle’ is packaged correctly for release
step1: mkdir android/app/src/main/assets
step2: 重命名 index.android.js 为 index.js
mv index.android.js index.js
接着运行下面一行代码
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
step3: react-native run-android
以上只是安卓环境等等配置好了以后,运行react-native run-android 在安卓模拟器上最后一点小坑,后面还会补充
报错3:dl.google.com: 未知的名称或服务
网络连接出现问题