The minCompileSdk (31) specified in a dependency's AAR metadata is greater than this module's compileSdkVersion (android-30)
Asked Answered
T

1

7

This is a knowledge sharing question.

I have a react-native project with compileSdkVersion and targetSdkVersion set to 30.
After upgrading expo version and related packages android app was not getting built.
The following error was appearing in logs:

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.sqlite:sqlite-framework:2.2.0.
AAR metadata file: /home/<MY USERNAME>/.gradle/caches/transforms-2/files-2.1/f7bf6c20b6aaa8d6365a0aa8e2ddf180/sqlite-framework-2.2.0/META-INF/com/android/build/gradle/aar-metadata.properties.

Spent lot of time trying to figure out what's the problem

Tabes answered 25/1, 2022 at 6:53 Comment(0)
T
10

The problem was facebook flipper.
I have upgraded flipper from version 0.54.0 to 0.129.0 in android/gradle.properties.
Looks like this problem was introduced in version 0.128.0.
Setting the version to 0.127.0 solved this issue.

However it introduced another issue. On Macbook pro with M1, emulator was crashing with null pointer dereference error.

So I had to downgrade flipper to 0.125.0.

Tabes answered 25/1, 2022 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.