79691082

Date: 2025-07-05 13:47:58
Score: 0.5
Natty:
Report link

Additional for build error on ~51

I was having a build error on ~51, just like @dchhetri. What solved it for me was:

1 - first following the instructions from @Daniel, e.g.:

edit "expo-build-properties" on app.json as he stated
also added withTargetSdk35
changed compileSdkVersion: 34

2 - After that, I was still encountering a build error, which was resolved by adding an additional custom plugin:

# Create this file at the root of your project
# metaSpace4GB.js 

const { withGradleProperties } = require('expo/config-plugins');

function setGradlePropertiesValue(config, key, value) {
  return withGradleProperties(config, exportedConfig => {
    const keyIdx = exportedConfig.modResults.findIndex(
      item => item.type === 'property' && item.key === key,
    );
    if (keyIdx >= 0) {
      exportedConfig.modResults.splice(keyIdx, 1, {
        type: 'property',
        key,
        value,
      });
    } else {
      exportedConfig.modResults.push({
        type: 'property',
        key,
        value,
      });
    }

    return exportedConfig;
  });
}

module.exports = function withCustomPlugin(config) {
    config = setGradlePropertiesValue(
      config,
      'org.gradle.jvmargs',
      '-Xmx4096m -XX:MaxMetaspaceSize=1024m',
    );
    return config;
};

Add the plugin to the app json:

...
    "plugins": [
      "./metaSpace4GB",
     ...
...

3 - Done

And that allowed me to build, my app is already on review by google with target SDK 35

enter image description here

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @dchhetri
  • User mentioned (0): @Daniel
  • Low reputation (1):
Posted by: Vasily Crespo