Application xxxx has not been registered.

Application RNApp has not been registered.

Hint: This error often happens when you're running the packager (local dev server) from a wrong folder. For example you have multiple apps and the packager is still running for the app you were working on before.

If this is the case, simply kill the old packager instance (e.g. close the packager terminal window) and start the packager in the correct app folder (e.g. cd into app folder and run 'npm start').

This error can also happen due to a require() error during initialization or failure to call AppRegistry.registerComponent.

错误描述:

RNApp 没有被注册;

错误详情:

1. index.js 注册主组件

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

2. MainActivity 返回JavaScript注册的主组件

protected String getMainComponentName() {

        return "RNApp";

}

解决方案:

index.js注册的主组件MainActivity中的返回JavaScript注册的主组件相同;

猜你喜欢

转载自blog.csdn.net/niuba123456/article/details/82086514