etayluz
etayluz

Reputation: 16436

Expo App shows app icon instead of splash image

Here is my app.json:

{
  "expo": {
    "name": "SignLingo",
    "slug": "SignLingo",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "scheme": "myapp",
    "userInterfaceStyle": "automatic",
    "newArchEnabled": true,
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#fefaf4"
    },
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.anonymous.SignLingo"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.anonymous.SignLingo"
    },
    "web": {
      "bundler": "metro",
      "output": "static",
      "favicon": "./assets/images/favicon.png"
    },
    "plugins": [
      "expo-router",
      [
        "expo-splash-screen",
        {
          "image": "./assets/images/splash-icon.png",
          "imageWidth": 200,
          "resizeMode": "contain",
          "backgroundColor": "#ffffff"
        }
      ]
    ],
    "experiments": {
      "typedRoutes": true
    }
  }
}

This is my ./assets/images/icon.png enter image description here

This is my ./assets/images/splash.png enter image description here

Both ./assets/images/icon.png and ./assets/images/splash.png are present and the app icon displays as expected. However my Splash screen displays ./assets/images/icon.png instead of ./assets/images/splash.png

enter image description here

The background color "#fefaf4" is correct but I'm seeing ./assets/images/icon.png instead of ./assets/images/splash.png

Why and how to get splash image to show correctly on splash screen?

I've already tried running npx expo prebuild --clean and then npx expo prebuild but that does nothing.

Upvotes: 3

Views: 397

Answers (1)

Álvaro Fonseca
Álvaro Fonseca

Reputation: 21

I had the same issue using expo v52. Install expo v51 and it will work.

run: npx expo install expo@^51.0.0 and then: npx expo install --fix

Upvotes: 2

Related Questions