Share icon

Hi everyone,

Today we see the common andorid studio error for java/kotlin and its solution.

Error:

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.core:core-ktx:1.7.0-alpha02. AAR metadata file: C:\Users\mohammad.zeeshan1.gradle\caches\transforms-2\files-2.1\a20beb0771f59a8ddbbb8d416ea06a9d\jetified-core-ktx-1.7.0-alpha02\META-INF\com\android\build\gradle\aar-metadata.properties.

You would see the above error while building the app and install to device, this error is because of dependency 

See Dependency: androidx.core:core-ktx:1.7.0-alpha02

To solve this we need to lower down the dependency according to our installing device sdk version, Just follow pictures below

1. Right click on "app" and select "Open module settings"

image

 

2. Click on Dependencies, and choose your dependency according to error in our case androidx.core:core-ktx:1.7.0-alpha02

Image

So just choose lower version and hit OK

Image

3. Now rebuild the app and see the error will fix.

If you have still issue post your error in comment section and we will try to fix them for you, just need to focus on the install device dependencies that required,

Hope you find this page useful, keep searching and keep learning

key2goal

Comments

Profile picture for user Duan Camargo
Ronak Kumawat (not verified)
Sun, 01/23/2022 - 12:47
Profile picture for user Duan Camargo
chris (not verified)
Mon, 01/24/2022 - 18:16
Profile picture for user Duan Camargo
elanasowell908873 (not verified)
Thu, 02/10/2022 - 04:21
Profile picture for user Duan Camargo
coreymcmurtry52696 (not verified)
Thu, 02/10/2022 - 04:32
Profile picture for user Duan Camargo
hiltonscholz403421 (not verified)
Thu, 02/10/2022 - 04:38

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.