Error Android Studio
One or more issues found when checking AAR metadata values:
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.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\appcompat-1.4.0\META-INF\com\android\build\gradle\aar-metadata.properties.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-resources:1.4.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\jetified-appcompat-resources-1.4.0\META-INF\com\android\build\gradle\aar-metadata.properties.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.emoji2:emoji2-views-helper:1.0.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\jetified-emoji2-views-helper-1.0.0\META-INF\com\android\build\gradle\aar-metadata.properties.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.emoji2:emoji2:1.0.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\jetified-emoji2-1.0.0\META-INF\com\android\build\gradle\aar-metadata.properties.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.work:work-runtime:2.7.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\work-runtime-2.7.0\META-INF\com\android\build\gradle\aar-metadata.properties.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:1.7.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\core-1.7.0\META-INF\com\android\build\gradle\aar-metadata.properties.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.lifecycle:lifecycle-process:2.4.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\jetified-lifecycle-process-2.4.0\META-INF\com\android\build\gradle\aar-metadata.properties.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.lifecycle:lifecycle-runtime:2.4.0.
AAR metadata file: C:\Users\User\.gradle\native\caches\transforms-3\…\transformed\lifecycle-runtime-2.4.0\META-INF\com\android\build\gradle\aar-metadata.properties.
Ошибка означает, что необходимо в файле build.gradle поменять версию SDK, пример
android { compileSdkVersion 31 defaultConfig { applicationId "ru.site.app" minSdkVersion 16 targetSdkVersion 30 versionCode 2 versionName "1.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } dependenciesInfo { includeInApk true includeInBundle true } buildToolsVersion '31.0.0' ndkVersion '23.1.7779620' }