I've been trying to fix this error from a couple weeks ago with no success. The problem is I cannot publish my app because of this.
When I build my expo app for any of both, iOS or Android, the Expo CLI signing process goes well, no errors and generates final bundles but when I install the spa or apk file into a real device it shows the splash screen 4 or 5 times in a row (some kind of loop) and finally shows the following error messages:
Checked out with no results:
https://forums.expo.io/t/application-main-has-not-been-registered/14395
Application main has not been registered
https://forums.expo.io/t/application-main-has-not-been-registered/11753
My package.json looks like this:
{
"name": "Sxunco",
"homepage": "https://www.sxunco.com",
"version": "1.0.3",
"private": true,
"main": "node_modules/expo/AppEntry.js",
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|react-clone-referenced-element|expo(nent)?|@expo(nent)?/.*|react-navigation|redux-persist|native-base(-shoutem-theme)|native-base|react-native-router-flux))"
]
},....
My App.js:
import React from 'react';
import Root from './src/native/index';
import configureStore from './src/store/index';
const { persistor, store } = configureStore();
export default function App() {
return <Root store={store} persistor={persistor} />;
}
Ive tried with same results:
- Adding
"appKey": "main"
into app.json - Adding
AppRegistry.registerComponent(‘main’, () => App);
into App.js and also exporegisterRootComponent(App)
(separated and both together, none of that works) - Changing "main" path in package.json directly to App.js and register app with above methods manually
When I run build I also run:
exp start --no-dev --minify
So I wait for the server to finish loading and then run expo build:android
Please I don't know what to do, I cannot publish my app because of this.