从SDK 32升级到SDK 36后,Expokit-启动屏幕未在Android上显示

时间:2020-02-05 13:13:02

标签: android react-native expo splash-screen

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

我们首先看到的是splash_background.xml的Splash图像,该图像已正确显示,然后我们看到的一切都是backgroundColor的{​​{1}}的颜色。

唯一进行更改的是app.json对象(backgroundColor)中的splash。 另外,我们正在使用app.json中的AppLoading,但是更改或删除它不会有任何影响。

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

环境

expo

app.json

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

splash_background.xml

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

2 个答案:

答案 0 :(得分:1)

在我的设备上使用 adb logcat(博览会裸工作流程)我有:

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

所以我尝试缩小我的 splashscreen_image.png... 并且它奏效了。

答案 1 :(得分:0)

如果替换此行会发生什么:

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

与此:

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

我遇到了一些位图最近不显示的问题,this post帮助了我。