我无法解决问题。当应用程序加载反应原生抛出警告。
WARN `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
WARN `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.
原文由 Muhammad Tahir 发布,翻译遵循 CC BY-SA 4.0 许可协议
这是与 react native reanimated library 相关的问题。我通过卸载库并重新安装它来解决它。删除 https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation 提供的 react-native-reanimated 库的所有安装步骤。
只需使用命令 npm install react-native-reanimated@2.3.0-beta.1 安装库
如果问题仍然存在,请在 android studio 中打开项目。转到文件-> 使缓存无效。之后一切正常。