Invariant Violation: "Example" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.

原因:return "react_navigaition_demo";引号里面返回的一定要是项目名,不能是 "Example"或者其他名称。
本文探讨了在运行React导航Demo项目时遇到的InvariantViolation错误,详细解释了错误发生的原因,包括Metro运行在错误的文件夹和模块加载失败。文章强调了在return语句中正确指定项目名的重要性。

7142

被折叠的 条评论
为什么被折叠?



