Field: android - should NOT have additional property 'enableDangerousExperimentalLeanBuilds'

Viewed 768

My expo version is 42.0.0. When I run "expo build:android -t app-bundle", I get this error:

Error: Problem validating fields in app.json. Learn more: https://docs.expo.io/workflow/configuration/ • Field: android - should NOT have additional property 'enableDangerousExperimentalLeanBuilds'. Couldn't publish because errors were found. (See logs above.) Please fix the errors and try again.

{
  "expo": {
    "name": "XXXX",
    "slug": "XXXX",
    "version": "1.2.0",
    "orientation": "portrait",
    "icon": "./assets/XXXX.png",
    "splash": {
      "image": "./assets/XXXX.png",
      "resizeMode": "contain",
      "backgroundColor": "#FBDB5B"
    },
    "privacy": "public",
    "platforms": [
      "android"
    ],
    "android": {
      "config": {
        "googleMobileAdsAppId": "XXXX"
      },
      "package": "com.XXXX",
      "versionCode": 16,
      "permissions": [],
      "enableDangerousExperimentalLeanBuilds": true
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"]
  }
}
1 Answers

The thing is, the property enableDangerousExperimentalLeanBuilds was removed.. https://docs.expo.dev/versions/latest/config/app/#android. Expo wants you to use EAS Build for smaller bundle sizes. You might have to drop the field, otherwise your app might work in development, but then crash once you put it in PlayStore.

Personally, I also had to eject as I wasn't satisfied with the sizes EAS gave me.

Related