【问题标题】:Expo React Native stuck on splash screen when redux and redux-thunk is imported导入 redux 和 redux-thunk 时,Expo React Native 卡在启动画面
【发布时间】:2021-06-21 07:11:23
【问题描述】:

我不知道应用程序卡在初始屏幕上的原因是什么。 我试过调试应用程序,只有在导入 redux 和 redux-thunk 时才会出现这种情况。

这些是出现的错误:

TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNShare.FACEBOOK')
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException

&

Invariant Violation: "main" 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.

【问题讨论】:

  • 尝试删除node_modules并重新运行npm i,然后重新启动应用程序?
  • @SnazzyMohit 是的,已经尝试过了,但仍然卡在闪屏上并出现该错误。

标签: react-native redux expo


【解决方案1】:

起初我使用./gradlew assembleRelease 生成一个APK,但使用./gradlew assembleDebug 为我解决了这个问题。我所需要的只是生成一个 APK,这个命令就帮我搞定了,我不知道为什么。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-23
    • 2016-11-19
    • 1970-01-01
    相关资源
    最近更新 更多