Splash Screen doesn't appear on Android standalone app

#1

Hi, I’m using expo SDK 23 and I’m having problems with splash screen. When I open the app through expo client, everything is going normally, and the splash screen appear correctly while app is loading. But when I open the standalone app in android, I only see the white screen. Do anyone have the same problem?

Here is my app.json:

{
  "expo": {
    "name": "MyApp",
    "description": "My App",
    "slug": "myapp",
    "privacy": "public",
    "sdkVersion": "23.0.0",
    "version": "1.4.0",
    "orientation": "portrait",
    "primaryColor": "#cccccc",
    "icon": "./assets/icon.png",
    "notification": {
        "icon": "./assets/icon_myapp_512_gray.png",
        "color": "#000000",
        "androidMode": "default"
    },
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#ffffff"
    },
    "packagerOpts": {
      "assetExts": ["ttf", "mp4"]
    },
    "ios": {
      "bundleIdentifier": "br.com.myapp",
      "buildNumber":"6",
        "splash": {
        "image": "./assets/splash.png",
        "resizeMode": "cover",
        "backgroundColor": "#ffffff"
      }
		},
		"android": {
      "package": "br.com.myapp",
      "versionCode": 6,
      "config": {
          "googleMaps": {
            "apiKey": "AIzaSyBEOZHnmh27O7zFh-R_b06nt1FL3yu_gm8"
        }
      },
      "splash": {
        "image": "./assets/splash.png",
        "resizeMode": "cover",
        "backgroundColor": "#ffffff"
      }
    },
    "androidStatusBarColor": "#cccccc",
		"androidStatusBar": {
			"barStyle": "dark-content",
			"backgroundColor": "#cccccc"
    }
  }
}

1 Like
#2

found a solution? I got the same issue

#3

Hey, sorry to hear you all are having trouble with the splash screen config. Looking at the docs it appears that you’re following the instructions correctly. It looks like a couple of other people are having the same issue as well, so our team is looking into it. Could you try upgrading to SDK 24 and let us know if it’s still an issue?

1 Like
#4

I have the same problem. No splash screen appears on standalone app. And it works fine on iOS.

1 Like
#5

I also have this problem.

#6

@darkwata and @softhib, which Expo SDK version are you guys using? Can you both provide any more details about your project?

#7

@jimmylee Sure. My situation is as follows:

After detaching an Expo app without having had a "splash" key in app.json. Adding a "splash" key to app.json does nothing for me. I also recently upgraded from SDK 25 to 26 before I detached. I am on SDK 26 now.

A workaround I did was to manually add a shell_launch_background_image.png to all of my drawable-xxxx folders on Android. For iOS I changed launch_background_image.png inside my Supporting folder.

#8

And that workaround is no longer working for you? @darkwata

#9

I resolved the “problem” by adding all screen sizes in app.json like this :

"ldpi": "./assets/images/Splash-screen.png",
"mdpi": "./assets/images/Splash-screen.png",
"hdpi": "./assets/images/Splash-screen.png",
"xhdpi": "./assets/images/Splash-screen.png",
"xxhdpi": "./assets/images/Splash-screen.png",
"xxxhdpi": "./assets/images/Splash-screen.png"
1 Like
#10

Solid! thanks for helping us out!

#11

@jimmylee yup that workaround works for me.

1 Like
#12

Hey, I was using SDK 23 in that time, but I was able to solve the problem using the others screen sizes in app.json

"splash": {
        "backgroundColor": "#ffffff",
        "resizeMode": "cover",        
        "ldpi": "./assets/splash.png",
        "mdpi": "./assets/splash.png",
        "hdpi": "./assets/splash.png",
        "xhdpi": "./assets/splash.png",
        "xxhdpi": "./assets/splash.png",
        "xxxhdpi": "./assets/splash.png"
1 Like