LoginSignup
1
4

More than 5 years have passed since last update.

Expoで「Application main has not been registered.」が出るとき(React Native)

Posted at

react-native-cliで作ったアプリをexpoで確認しようとすると、以下のエラーが出ます。

Application main has not been registered.

これは、expoではデフォルトで'main'という名前のAppを探しに行くためです。

react-native-cliで作った場合はアプリ名が指定されていると思います。
index.jsに書いてあります。

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

なので、app.jsonでexpo.appKeyを指定することで、解消されます。

{
  "name": "appName",
  "displayName": "appName",
  "expo": {
    "sdkVersion": "27.0.0",
    "appKey": "appName",
  }
}
1
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
4