iOS上的React Native:模块AppRegistry不是已注册的可调用模块

时间:2018-10-29 13:55:16

标签: ios reactjs react-native react-native-ios

我正在构建一个React Native应用程序。实施相机功能后,在iOS上,iOS应用突然崩溃了。

我收到以下错误:

2018-10-29 14:48:26.353 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 'CameraManager.Aspect')
2018-10-29 14:48:26.356 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 'CameraManager.Aspect')
2018-10-29 14:48:26.368 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
2018-10-29 14:48:26.379 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

我找到了有关此问题的多个线索,并做了所有相应的解决方案。我确实运行了react-native link,重新启动了Metro,清理了我的build文件夹,这是我的index.js(我也在使用React Native Firebase,但是当我添加它时,一切仍然有效...) :

/** @format */

import { AppRegistry } from "react-native";
import App from "./app/App";
import { name as appName } from "./app.json";
import bgMessaging from "./app/services/fcm";

// New task registration
AppRegistry.registerHeadlessTask("RNFirebaseBackgroundMessage", () => bgMessaging);
// Current main application
AppRegistry.registerComponent(appName, () => App);

这可能是什么原因?

0 个答案:

没有答案