首页 > 解决方案 > Expokit - 从 SDK 32 升级到 SDK 36 后,启动屏幕未在 Android 上显示

问题描述

我目前正在处理一个被弹出到 Expokit 的项目,几周前我们将 SDK 版本从 32 升级到 SDK 36,从那时起,在 Android 设备中,配置选项中的启动画面app.json不再显示。

我们首先看到的splash_background.xml是正确显示的 Splash 图像,然后我们看到的一切都是backgroundColorfrom的颜色app.json

唯一需要更改的是对象backgroundColor内部splash( app.json)。我们也在使用AppLoadingfrom expo,但更改或删除它不会影响任何事情。

这仅在 Android 上发生,否则在 iOS 设备上一切看起来都不错。

环境

    - "react": "~16.9.0",
    - "react-native": "0.61.4",
    - "expo": "~36.0.0",
    - "expokit": "36.0.0",

应用程序.json

    "sdkVersion": "36.0.0",
    "androidStatusBarColor": "#002C61",
    "androidStatusBar": {},
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#bc0229"
    },

splash_background.xml

    <?xml version="1.0" encoding="utf-8"?>enter code here
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">

        <item android:drawable="@color/splashBackground"/>

        <item><bitmap android:gravity="center" android:src="@drawable/splash" /></item>

    </layer-list>

标签: androidreact-nativeexposplash-screen

解决方案


在我的设备上使用adb logcat(expo 裸工作流)我有:

W OpenGLRenderer: Bitmap too large to be uploaded into a texture (2484x4672, max=4096x4096)

所以我尝试缩小我的splashscreen_image.png...并且它起作用了。


推荐阅读