【发布时间】:2020-02-05 13:13:02
【问题描述】:
我目前正在处理一个被弹出到 Expokit 的项目,几周前我们将 SDK 版本从 32 升级到 SDK 36,从那时起,在 Android 设备中,app.json 中配置选项的启动画面没有显示没了。
我们首先看到的是来自splash_background.xml 的Splash 图像,它正确显示,然后我们看到的一切都是来自app.json 的backgroundColor 的颜色。
唯一需要更改的是 splash 对象 (app.json) 中的 backgroundColor。
此外,我们使用的是 expo 中的 AppLoading,但更改或删除它不会影响任何事情。
这只是在 Android 上发生,否则在 iOS 设备上一切看起来都不错。
环境
- "react": "~16.9.0",
- "react-native": "0.61.4",
- "expo": "~36.0.0",
- "expokit": "36.0.0",
app.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>
【问题讨论】:
标签: android react-native expo splash-screen