Open Buk1m opened 4 months ago
+1. And the error from gradle is so cryptic, it's completely unclear that the BG color should be added in expo.
I also encountered this issue when building with EAS after upgrading from Expo 48 to 51. Previously, I hadn't set the splash configuration in my app.json. After the upgrade, I received same error during the build process.
Then I added the splash bgcolor, and the build worked without any issues
{
"expo": {
"splash": {
"backgroundColor": "#ffffff"
}
}
}
I think bgcolor should be added in expo, even without setting a splash image.
https://docs.expo.dev/tutorial/configuration/#configure-the-splash-screen-background-color
I do understand how to configure splash screen.
The issue is you can have invalid config and both the expo-doctor and provided TS types are allowing for such config, resulting in a cryptic error during build process. There is no mention that the backgroundColor
is now required as previously in version 49, it wasn't.
Summary
Android build using on local and remote EAS build if app.json splash:{ backgroundColor } is not specified.
I upgraded the app from expo 49 to expo 51 and the eas-cli to lastest version. Previously the app build worked without issues for android with only splash:{ image } being specified. After the upgrade the build fails and the solution was to add a color value for the splash:{ backgroundColor } attribute
fails:
succedes:
Managed or bare?
Managed
Environment
Error output
Reproducible demo or steps to reproduce from a blank project
I don't have time to create demo but I assume if you create project with the latest expo add
app.json
/app.config.js
splash withimage
withoutbackgroundColor
property and useeas
to build the app for android.Current behaviour is not consistent with the expo-doctor schema validation, and with types specified for ExpoConfig where the backgroundColor is optional.