React Native Error – Application has not Been Registered

If you change react native project name by mistake, you might encounter the error, “Application has not been registered”. In my case, I uploaded a demo project over to an existing project , and overwrote the index.js file.

Application has not been registered error

The index.js was as below before upload.

import { AppRegistry } from "react-native";
import App from "./App";

AppRegistry.registerComponent("reactnativetest", () => App);

After upload:

import { AppRegistry } from "react-native";
import App from "./App";

AppRegistry.registerComponent("demoapp", () => App);

The error occurred since the name of the registered component was different than the initial project name. When you replace the name with original name in registerComponent, the app runs without any errors.

There might be other reasons causing this error, like running the packager from a wrong directory. I recommend to check the discussion on stackoverflow if this fix was not any help to you.