After migration to react-native 61 the developer menu on emulator looks differrent.

huangapple go评论95阅读模式
英文:

After migration to react-native 61 the developer menu on emulator looks differrent

问题

在从React Native 59迁移到61后,模拟器中的开发者菜单看起来不同,当点击调试时,它显示了一个错误!查看图像描述
After migration to react-native 61 the developer menu on emulator looks differrent.

英文:

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 errorAfter migration to react-native 61 the developer menu on emulator looks differrent.
After migration to react-native 61 the developer menu on emulator looks differrent.

答案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

huangapple
  • 本文由 发表于 2020年1月7日 00:15:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615422.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定