I have recently started to convert my react native app and running on Expo so i could test this on my actual android device. I am getting this error above. I have since then
I created a Project from "Doco", and save it with Practice. so write that line like that
AppRegistry.registerComponent('Practice', () => FixedDimensionsBasics);
then I get an error like in a question
So, I check on my Appdelegate.m file on ios folder and find that Project name is Project so I change that line with
AppRegistry.registerComponent('Project', () => FixedDimensionsBasics);
and my Error solved
so if you are using "Doco" then check that thing.
The following solution worked:
AppRegistry.registerComponent('main',() => App);
Credits: Rishav Kumar
(Cannot you people just reply to mark as solve ?)
Removed node_modules and reinstalled by yarn that worked for me.
The problem is you haven't opened your project in Android Studio. The previous project is running in android studio and you are running the latest one in emulator.
I came across this issue because I had previously run a React project that was not fully shut down. To fix this, I could have restarted my computer. But I chose to do this instead: (Using MacOS, should work with Linux as well, for Windows you would likely need to use Task Manager or similar):
After killing the process you should be able to run your react-native project.