0

The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-30). Dependency: androidx.appcompat:appcompat:1.4.1.

I have tried to change the compileSdkVersion and targetsdkVersion

  • Does this answer your question? [React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0](https://stackoverflow.com/questions/74334162/react-native-android-build-failure-with-different-errors-without-any-changes-in) – Thanhal P A Nov 08 '22 at 09:32
  • Its the same question I think we can mark it as a duplicate. – HarshitMadhav Nov 08 '22 at 16:45

1 Answers1

0

Add this to android -> build.gradle

buildscript {
    // ...
}

allprojects {
    repositories {
        exclusiveContent {
            filter {
                includeGroup "com.facebook.react"
            }
            forRepository {
                maven {
                    url "$rootDir/../node_modules/react-native/android"
                }
            }
        }
        // ...
    }
}
Mustafa Poya
  • 2,615
  • 5
  • 22
  • 36