英文:
After migration to react-native 61 the developer menu on emulator looks differrent
问题
在从React Native 59迁移到61后,模拟器中的开发者菜单看起来不同,当点击调试时,它显示了一个错误!查看图像描述
英文:
After migration to react-native 61 from 59 the developer menu in emulator looks different and when click on debug it is show me an error
答案1
得分: 0
有多个原因导致应用无法连接。您必须在相同的网络上,或者可能存在adb的问题。您可以参考此网页,了解如何在设备或模拟器上运行应用程序的更多详细信息。在我遇到问题时,这对我非常有帮助。
英文:
There are multiple reasons why the app does not connect. You have to be on the same network or there might be an issue with the adb. Can you please refer to this webpage for more clarity on how to run the app on device or simulator. It helped me out a lot while having issues.
答案2
得分: 0
我手动添加了以下脚本来启动 Start Packager 构建阶段,Bundler 正常运行:
export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}"
echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${SRCROOT}/../node_modules/react-native/scripts/.packager.env"
if [ -z "${RCT_NO_LAUNCH_PACKAGER+xxx}" ] ; then
if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then
if ! curl -s "http://localhost:${RCT_METRO_PORT}/status" | grep -q "packager-status:running" ; then
echo "Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly"
exit 2
fi
else
open "$SRCROOT/../node_modules/react-native/scripts/launchPackager.command" || echo "Can't start packager automatically"
fi
fi
参考链接:https://github.com/facebook/react-native/issues/25585
英文:
I added Start Packager build phase manually with the following script and bundler is up and running:
export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}"
echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${SRCROOT}/../node_modules/react-native/scripts/.packager.env"
if [ -z "${RCT_NO_LAUNCH_PACKAGER+xxx}" ] ; then
if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then
if ! curl -s "http://localhost:${RCT_METRO_PORT}/status" | grep -q "packager-status:running" ; then
echo "Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly"
exit 2
fi
else
open "$SRCROOT/../node_modules/react-native/scripts/launchPackager.command" || echo "Can't start packager automatically"
fi
fi
reference: https://github.com/facebook/react-native/issues/25585
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论