React Native Expo项目启动屏仅显示应用图标而非指定启动页图片的问题求助
React Native Expo项目启动屏仅显示应用图标而非指定启动页图片的问题求助
各位大佬好,我在开发Expo React Native项目时碰到了启动屏的问题,折腾了好一会儿没搞定,来求助大家!
先贴出我的app.json配置代码:
{ "expo": { "name": "MyApp", "slug": "MyApp", "version": "1.0.0", "orientation": "portrait", "icon": "./assets/images/icon.png", "scheme": "myapp", "userInterfaceStyle": "automatic", "newArchEnabled": true, "ios": { "supportsTablet": true }, "android": { "adaptiveIcon": { "foregroundImage": "./assets/images/coffee-splash.png", "backgroundColor": "#000000" } }, "web": { "bundler": "metro", "output": "static", "favicon": "./assets/images/favicon.png" }, "plugins": [ "expo-router", [ "expo-splash-screen", { "image": "./assets/images/coffee-splash.png", "resizeMode": "contain", "backgroundColor": "#000000" } ] ], "experiments": { "typedRoutes": true } } }
我遇到的问题是:我通过expo-splash-screen插件指定了启动屏图片"./assets/images/coffee-splash.png",但实际启动应用时,只显示icon字段配置的./assets/images/icon.png,完全看不到我设置的启动屏图片。我已经确认所有图片的路径都是正确的,实在搞不懂哪里出问题了,有没有朋友能指点一下?
备注:内容来源于stack exchange,提问作者Kathirvel Rajmohan
相关产品推荐
相关产品推荐

