我用
eas build -p android --profile preview
构建了我的应用程序,当我下载并运行我的应用程序时 splash.png
图像未显示它,这里只显示空白屏幕,我的 app.json
:
{
"expo": {
"name": "{app name}",
"slug": "{app-slug}",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png"
},
"package": "{package name}"
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "{project id}"
}
},
"build": {
"preview": {
"android": {
"buildType": "apk"
}
},
"preview2": {
"android": {
"gradleCommand": ":app:assembleRelease"
}
},
"preview3": {
"developmentClient": true
},
"production": {}
}
}
}
构建我的应用程序时没有错误。这里
eas.json
:
{
"cli": {
"version": ">= 3.16.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
将 resizeMode 设置为 cover,并更改启动画面的背景颜色,或者仔细检查启动画面是否包含白色,因为如果背景是白色,它将不会显示。
你找到解决办法了吗?我也面临同样的问题