“Invariant Violation: Application AwesomeProject has not been registered” When building for iOS device with static jsbundle

后端 未结 14 2377
刺人心
刺人心 2020-12-08 18:20

First off, I don\'t know react, but I figured deploying to an iOS device instead of the simulator wouldn\'t be too difficult to do with the docs. They were a bit sparse but

14条回答
  •  忘掉有多难
    2020-12-08 18:55

    Usually, this Error nowadays has to do with the different versions of react-navigation being used.

    If you are using react-navigation 4.0

    "react-navigation": "^4.1.0",

    you have to make sure you are importing the right elements from the right places

    in your app.js

    import { createAppContainer, createSwitchNavigator } from 'react-navigation'
    import { createStackNavigator } from 'react-navigation-stack'
    import { createBottomTabNavigator } from 'react-navigation-tabs'
    

    This has helped me resolved the issue.

提交回复
热议问题