我不能确定是因为这个原因,但是我使用react-native-rename更新了我的项目名,几个小时后就重新构建了这个项目。从那以后,我不能在设备上重新加载我的项目。
注意,它在模拟器上工作,而不仅仅是在真正的设备上工作。运行npm-start返回:
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
│ Running Metro Bundler on port 8081. │
│ │
│ Keep Metro running while developing on any JS projects. Feel free to │
│ close this tab and run your own Metro instance if you prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/Project/Client
Metro Bundler ready.
Loading dependency graph, done. 不管发生什么都不更新。我试图按照这里的建议在.git中查找.git,但是我找不到.git目录,所以我相信这不是问题所在。
我还按照这里的建议尝试了rm -rf /usr/local/var/run/watchman && brew uninstall watchman && brew install watchman,#10889没有任何结果。
沿着这条路,我也尝试了watchman watch-del-all和rm -fr /usr/local/var/run/watchman/$USER-state
发布于 2018-07-03 16:01:32
应该为实际设备设置调试服务器地址。
https://facebook.github.io/react-native/docs/running-on-device.html#method-2-connect-via-wi-fi
https://stackoverflow.com/questions/51158191
复制相似问题