Expo App Not Displaying Custom Icon and Splash Image

PressRex profile image
by PressRex
Expo App Not Displaying Custom Icon and Splash Image

I pulled down the repo for our mobile app, added our custom PNG image files into the assets folder, updated the paths in app.json for "icon" and "splash". I expected this to display custom app icon and splash screen images. However, when I run our npm run android script, which builds and runs the app by running expo run:android, the default Expo icon is still displayed for the app icon and app splash page.

  1. Checked and verified the file paths. The paths specified in app.json for my assets are:
  "icon": "./src/assets/images/icon.png",
  "splash": {
    "image": "./src/assets/images/splash.png"
  }
}

I even confirmed the image's location using the command ls ./src/assets/images/icon.png.

  1. Ensured the images are in PNG format.
  2. Cleared caches using expo start --clear, deleted node_modules, and executed fresh dependency installations.
  3. Reset the data on the Android Virtual Device (AVD).
  4. Created a test app using npx create-expo-app. This app successfully displayed the custom splash image (but not the icon image, since it was running in Expo Go) when I ran npm run android.
  5. I realized that the test app's script was running expo start --android while the main app's script was running expo run:android. I modified this to match the test app's script and saw the same behavior as with the test app. However, I need it to run and work with expo run: android.
  6. I tried to run the app on a physical device but ran into problems when when trying to scan the QR code.

I don't have a ton of mobile dev experience and am pretty stuck at this point. If you have any ideas or have run into this before, I'd really appreciate some help. Thanks!

Source: View source

PressRex profile image
by PressRex

Subscribe to New Posts

Lorem ultrices malesuada sapien amet pulvinar quis. Feugiat etiam ullamcorper pharetra vitae nibh enim vel.

Success! Now Check Your Email

To complete Subscribe, click the confirmation link in your inbox. If it doesn’t arrive within 3 minutes, check your spam folder.

Ok, Thanks

Read More