在android设备中运行app的步骤:1。cd(项目目录)2。react-native run-android
为了解决这个问题,我使用了下面提到的命令:
1.(in project directory) mkdir android/app/src/main/assets
2. 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
之后,我遇到了问题“错误:ENOSPC:设备上没有剩余空间”,附上截图。请检查一下。 issue screenshot here
试试npm cache clear
如果它不起作用,请尝试此命令。
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
尝试
1. cd(directory)
2. cd android
3. gradlew clean
4. cd ..
5. react-native run-android`