React-Native: Application has not been registered error

后端 未结 23 2155
無奈伤痛
無奈伤痛 2020-12-22 18:55

I am currently going through the React-Native tutorials. I began with the Getting Started tutorial, where I made a new react native project and successfully managed to run t

23条回答
  •  失恋的感觉
    2020-12-22 19:20

    I guess it is an error caused by not matching name of project and your registered component.

    You have inited project with one name, i.e.

    react-native init AwesomeApp

    But in your index.ios.js file you register other component

    AppRegistry.registerComponent('Bananas', () => Bananas);

    When it must be

    AppRegistry.registerComponent('AwesomeApp', () => Bananas);

    If your component name does match, ensure you don't have any other react-native/node process running in another terminal.

提交回复
热议问题