xcode - React-Native:不变违规:模块 AppRegistry 不是注册的可调用模块(调用 runApplication)
问题描述
我的应用在 Xcode 中构建,在 ios 模拟器上弹出启动画面,然后什么也没有发生。我尝试重新启动 Metro 捆绑器、擦除 Metro 捆绑器的缓存、重新安装所有 pod、重新安装所有节点模块并重新构建应用程序。我从 Xcode 终端收到以下反馈:
2020-04-24 17:02:50.186 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating '_argonTheme.argonTheme.COLORS')
2020-04-24 17:02:50.190 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: TypeError: undefined is not an object (evaluating '_argonTheme.argonTheme.COLORS')
2020-04-24 17:02:50.198 [error][tid:com.facebook.react.JavaScript] Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
2020-04-24 17:02:50.376 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
解决方案
对我来说,这是由错误的导入语句引起的。Xcode 终端提供的细节很少,所以我不得不注释掉每个屏幕上的每个导入语句以找到罪魁祸首。
推荐阅读
- python - 如何使用 python 创建 struct c 并在套接字上发送
- gcc - 覆盆子:icecc 并将本机 gcc 编译器与 gcc 交叉编译器混合
- php - 如何创建到 Stripe 结帐页面的 url?
- ios - SwiftUI 使用 NavigationLink 调试列表单元格
- kotlin - 如何通过 gradle 任务执行具有依赖注入的特定类方法?
- python - Flask-Dropzone 上传后异步更新页面内容
- android - RN Android - 无法将没有 YogaNode 的子代添加到没有测量功能的父代
- flutter - Flutter SliverAppBar -- 允许滚动直到 SliverAppBar 不再可见
- php - Laravel 正则表达式用于友好的 url,字符串破折号的长度未知
- c# - 是 ASP.NET Core、Microsoft.FeatureManagement
TagHelper 设计不好?