android - Expokit - 从 SDK 32 升级到 SDK 36 后,启动屏幕未在 Android 上显示
问题描述
我目前正在处理一个被弹出到 Expokit 的项目,几周前我们将 SDK 版本从 32 升级到 SDK 36,从那时起,在 Android 设备中,配置选项中的启动画面app.json
不再显示。
我们首先看到的splash_background.xml
是正确显示的 Splash 图像,然后我们看到的一切都是backgroundColor
from的颜色app.json
。
唯一需要更改的是对象backgroundColor
内部splash
( app.json
)。我们也在使用AppLoading
from 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>
解决方案
在我的设备上使用adb logcat
(expo 裸工作流)我有:
W OpenGLRenderer: Bitmap too large to be uploaded into a texture (2484x4672, max=4096x4096)
所以我尝试缩小我的splashscreen_image.png
...并且它起作用了。
推荐阅读
- scrapy - Scrapy 错误:TypeError:__init__() 得到了一个意外的关键字参数“cb_kwargs”
- c# - SqlGeography.STPolyFromText - 引发错误 24201:纬度值必须在 -90 到 90 度之间
- javascript - 从数组中获取对象并推送到新数组
- html - 使按钮不可见,仅在悬停在 div 上或输入内有文本时显示
- python - 在新的 Google 标签上粘贴数据
- reactjs - 过滤简单的平面列表
- firebase - Firestore 规则 - 用户可以在应用范围之外编写吗?
- python - 如何从元组列表中获取每个元组值的所有关系/邻居?
- linux - 获取之前的 nginx 配置文件
- embedded-linux - 如何减少 sendto 的延迟?