1

I'm trying to build expo app for android using eas cli by running the command: eas build --platform android. It fails at 'Ran gradlew' command in the eas dashboard with the following error log

[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[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).
[stderr]      Dependency: androidx.browser:browser:1.4.0.
[stderr]      AAR metadata file: /home/expo/.gradle/caches/transforms-3/cfea03dc6ed1fbdd623bca4e7a73327b/transformed/browser-1.4.0/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 2m 57s

and here is my android/build.gradle

buildscript {
    ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
    }
epix
  • 133
  • 1
  • 9

1 Answers1

0
file: /home/expo/.gradle/caches/transforms-3/cfea03dc6ed1fbdd623bca4e7a73327b/transformed/browser-1.4.0/META-INF/com/android/build/gradle/aar-metadata.properties.

first open this file and see like this

aarFormatVersion=1.0
aarMetadataVersion=1.0
minCompileSdk=21   <------------this is you add in your file[aar-metadata.properties.]
minCompileSdkExtension=0
minAndroidGradlePluginVersion=1.0.0

Hope this will help you