EAS - Android build fails due to a difference between minCompileSdk and compileSdkVersion

  • Managed Workflow
  • EAS CLI version: eas-cli/0.34.0
  • Expo SDK: 42.0.0

Just recently switched to EAS from Classic - iOS builds are fine, however Android fails due to below error:

[stderr] Execution failed for task ‘:app:checkReleaseAarMetadata’. [stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction [stderr] > The minCompileSdk (31) specified in a [stderr] dependency’s AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) [stderr] is greater than this module’s compileSdkVersion (android-30).

Appreciate any help on this. Thanks!

can you link to the build page and provide a minimal reproducible example or more detailed information about your project?

@brents

  • Managed Workflow
  • EAS CLI version: eas-cli/0.34.0
  • Expo SDK: 42.0.0

here is my dependency file

“dependencies”: {
@aws-amplify/cli”: “^5.1.0”,
@aws-amplify/ui-react”: “^0.2.34”,
@formatjs/intl-datetimeformat”: “^4.2.1”,
@formatjs/intl-displaynames”: “^5.2.1”,
@formatjs/intl-getcanonicallocales”: “^1.7.2”,
@formatjs/intl-listformat”: “^6.3.1”,
@formatjs/intl-locale”: “^2.4.35”,
@formatjs/intl-numberformat”: “^7.2.1”,
@formatjs/intl-pluralrules”: “^4.1.1”,
@formatjs/intl-relativetimeformat”: “^9.2.1”,
@gorhom/bottom-sheet”: “^2”,
@react-native-async-storage/async-storage”: “~1.15.0”,
@react-native-community/datetimepicker”: “3.5.2”,
@react-native-community/masked-view”: “0.1.10”,
@react-native-community/netinfo”: “6.0.0”,
@stripe/stripe-react-native”: “0.1.4”,
“amazon-cognito-identity-js”: “^5.2.2”,
“aws-amplify”: “^3.4.3”,
“aws-amplify-react-native”: “^4.2.1”,
“crypto-js”: “3.1.9-1”,
“expo”: “^42.0.0”,
“expo-image-picker”: “~10.2.2”,
“expo-localization”: “~10.2.0”,
“expo-notifications”: “~0.12.3”,
“expo-status-bar”: “~1.0.4”,
“expo-web-browser”: “~9.2.0”,
“metro”: “0.58.0”,
“mime-types”: “^2.1.27”,
“moment”: “^2.29.1”,
“moment-timezone”: “^0.5.33”,
“react”: “16.13.1”,
“react-dom”: “^17.0.2”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz”,
“react-native-animatable”: “^1.3.3”,
“react-native-autocomplete-input”: “^4.2.0”,
“react-native-dialog-input”: “^1.0.8”,
“react-native-dropdown-picker”: “^5.1.15”,
“react-native-elements”: “^3.4.2”,
“react-native-gesture-handler”: “~1.10.2”,
“react-native-gifted-chat”: “^0.16.3”,
“react-native-google-places-autocomplete”: “^2.2.0”,
“react-native-icon-badge”: “^1.1.3”,
“react-native-inappbrowser-reborn”: “^3.5.1”,
“react-native-keyboard-aware-scroll-view”: “^0.9.4”,
“react-native-linear-gradient”: “^2.5.6”,
“react-native-localize”: “^2.1.1”,
“react-native-paper”: “^4.7.2”,
“react-native-paper-dates”: “^0.4.6”,
“react-native-paper-dropdown”: “^1.0.2”,
“react-native-reanimated”: “2.2.0”,
“react-native-safe-area-context”: “^3.2.0”,
“react-native-screens”: “~3.4.0”,
“react-native-swipe-gestures”: “^1.0.5”,
“react-native-touchable-scale”: “^2.1.1”,
“react-native-vector-icons”: “^8.1.0”,
“react-native-web”: “^0.17.1”,
“react-navigation”: “^4.4.0”,
“react-navigation-drawer”: “^2.5.0”,
“react-navigation-header-buttons”: “^4.0.2”,
“react-navigation-stack”: “^2.8.2”,
“react-navigation-tabs”: “^2.9.0”,
“react-redux”: “^7.2.0”,
“redux”: “^4.0.5”,
“redux-thunk”: “^2.3.0”,
“uuid”: “^8.3.0”
},

and here is eas.json:
{
“cli”: {
“version”: “>= 0.34.0”
},
“build”: {
“development”: {
“developmentClient”: true,
“distribution”: “internal”
},
“preview”: {
“distribution”: “internal”
},
“production”: {}
},
“submit”: {
“production”: {}
}
}

Is there anyway in Expo Managed workflow to match minCompileSdk and compileSdkVersion to the same version for Android without ejecting the project files?

i’d suggest running expo prebuild -p android and expo run:android --variant release locally to debug the issue, it’s likely caused by some library that you are using, and then when you have a solution you can cleanup the files and go back to managed

1 Like