0

The error message:

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.navigation:navigation-fragment:2.4.1.

AAR metadata file: /Users/alian/.gradle/caches/transforms-3/dfc7e7791b25c1d405f07b2f91495db8/transformed/navigation-fragment-2.4.1/META-INF/com/android/build/gradle/aar-metadata.properties.

Kaushal Lalani
  • 125
  • 2
  • 16

1 Answers1

0

The error message hints at how to resolve the issue. The minCompileSdk can never be higher than your compileSdkVersion which is also hinted in the name of the parameters, as the minCompileSdk is the minimum SDK you want to support, so setting it to a higher value than the compileSdkVersion should intuitively mean that it won't be the minimum sdk version needed.

Either downgrade your minCompileSdk to 30 og upgrade your compileSdkVersion to 31, to fix this issue. You can read more about these parameters in this thread: What is the difference between compileSdkVersion and targetSdkVersion?

BaconPancakes
  • 375
  • 7
  • 21