I was having a build error on ~51, just like @dchhetri. What solved it for me was:
edit "expo-build-properties" on app.json as he stated
also added withTargetSdk35
changed compileSdkVersion: 34
# 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",
...
...
And that allowed me to build, my app is already on review by google with target SDK 35