app.json DangerousExperimental: true issue

Please provide the following:

  1. SDK Version:42.0.1
  2. Platforms(Android/iOS/web/all): Android
  3. enableDangerousExperimentalLeanBuilds app.json

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: Configuration with app.json / app.config.js - Expo Documentation • 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": ["**/*"]
  }
}

Hi @thor233

That option was dangerous and experimental. :joy:

I suspect they’ve abandoned it. These days you can use EAS Build to get a much smaller build. You can also use Hermes to make it smaller still.

See also expo.fyi/managed-app-size

1 Like

Hey @thor233, as Michael mentioned we no longer support the leanBuild option and highly suggest building with EAS as it’s a much more reliable and polished means to efficiently build a binary.

Cheers,
Adam

Hey I solved the issue. Just change SDK version to 40.0.0 in app.json.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.