这是我的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 } } }
{“icon”:“./assets/images/icon.png”}中使用的图像仅显示在启动屏幕或加载屏幕中。我想显示闪屏图像 - 即 - {"image": "./assets/images/coffee-splash.png"}
路径正确,但仅显示图标图像。
您可以自定义您的博览会应用程序启动屏幕,如下所示,
{
"expo": {
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain", // Options: "contain", "cover", "native"
"backgroundColor": "#ffffff" // Set the background color
}
}
}