0

I have a managed expo project that uses react-native. I am getting an error when building for android that is essentially this error: https://github.com/dooboolab/react-native-iap/issues/1373

I see the solution is to add the following code to the default config

{ missingDimensionStrategy 'store', 'play' }

I have a managed project, so my default config is not setup like the ones in that thread. My question is where can i add this missingDimensionStrategy in my project so that it builds for android properly?

Here is my metroconfig.js file, which I think is where i would add something like this, but am unsure how.

const { getDefaultConfig } = require('expo/metro-config');

const config = getDefaultConfig(__dirname);
module.exports = config;

or should i add something in my app.json?

{
  "expo": {
    "name": "x",
    "slug": "x",
    "privacy": "unlisted",
    "owner": "x",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.2.288",
    "orientation": "portrait",
    "icon": "./assets/images/icon-transparent.png",
    "scheme": "lifemax",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#78a6ff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0,
      "enabled": false,
      "checkAutomatically": "ON_ERROR_RECOVERY",
      "url": "https://u.expo.dev/e43c36bd-cfdb-4be9-9d69-135ea8a56c86"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "x",
      "buildNumber": "1.2.288",
      "requireFullScreen": true,
      "icon": "./assets/images/icon.png",
      "backgroundColor": "#78a6ff",
      "infoPlist": {
        "UIUserInterfaceStyle": "Light"
      }
    },
    "android": {
      "package": "x",
      "versionCode": 288,
      "backgroundColor": "#78a6ff",
      "icon": "./assets/images/icon-transparent.png",
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/icon-android-adaptive.png",
        "backgroundColor": "#78a6ff"
      },
      "permissions": []
    },
    "androidStatusBar": {
      "hidden": true,
      "barStyle": "light-content",
      "backgroundColor": "#78a6ff",
      "translucent": false
    },
    "androidNavigationBar": {
      "visible": "immersive",
      "barStyle": "light-content",
      "backgroundColor": "#78a6ff"
    },
    "notification": {
      "icon": "./assets/images/icon-notification.png",
      "iosDisplayInForeground": false,
      "androidMode": "collapse",
      "androidCollapsedTitle": "Assess your Life!",
      "color": "#000000"
    },
    "extra": {
      "eas": {
        "projectId": "e43c36bd-cfdb-4be9-9d69-135ea8a56c86"
      }
    },
    "runtimeVersion": {
      "policy": "sdkVersion"
    },
    "plugins": [
      [ "expo-build-properties",
        {
          "ios": {
            "deploymentTarget": "15.0"
          }
        }
      ]
    ]
  }
}

0 Answers0