React-Native: Application has not been registered error

后端 未结 23 1941
無奈伤痛
無奈伤痛 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:00

    I think the node server is running from another folder. So kill it and run in the current folder.

    Find running node server:-

    lsof -i :8081

    Kill running node server :-

    kill -9 <PID>

    Eg:-

    kill -9 1653

    Start node server from current react native folder:-

    react-native run-android

    0 讨论(0)
  • 2020-12-22 19:00

    I resolved this by changing the following in the app.json file. It appears the capital letter was throwing this error.

    From:

    {
      "name": "Nameofmyapp",
      ...
    }
    

    To:

    {
      "name": "nameofmyapp",
      ...
    }
    
    0 讨论(0)
  • 2020-12-22 19:01

    I had the same problem and for me the root cause was that I ran (react-native start) the packager from another react-native folder (AwesomeApp), while I created another project in an other folder.

    Running the packager from the new app's directory solved it.

    0 讨论(0)
  • 2020-12-22 19:02

    This solution worked for me after 2 days of debugging. Change this :

    AppRegistry.registerComponent('AppName', () => App);
    

    to

    AppRegistry.registerComponent('main', () => App);
    
    0 讨论(0)
  • 2020-12-22 19:06

    My solution is change module name in "AppDelegate.m"

    from moduleName:@"AwesomeProject"

    to moduleName:@"YourNewProjectName"

    0 讨论(0)
  • 2020-12-22 19:08

    Please check your app.json file in project. if there has not line appKey then you must add it

    {
      "expo": {
        "sdkVersion": "27.0.0",
        "appKey": "mydojo"
      },
      "name": "mydojo",
      "displayName": "mydojo"
    }
    
    0 讨论(0)
提交回复
热议问题