我目前正在开发一个项目,该项目已弹出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"
},
答案 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帮助了我。