当我试图运行我的Android应用程序,我得到了下面的错误

xt0899hw  于 2023-05-05  发布在  Android
关注(0)|答案(1)|浏览(332)

检查AAR元数据值时发现的一个或多个问题:

The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.appcompat:appcompat-resources:1.6.1.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\64a1477697d6b03973d455a563e780d5\transformed\jetified-appcompat-resources-1.6.1\META-INF\com\android\build\gradle\aar-metadata.properties.

The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.appcompat:appcompat:1.6.1.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\43e014661a354c897c33e935275a520f\transformed\appcompat-1.6.1\META-INF\com\android\build\gradle\aar-metadata.properties.

The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.activity:activity:1.6.0.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\122eb7bbeeb9e5a986a3880fdb7295b6\transformed\jetified-activity-1.6.0\META-INF\com\android\build\gradle\aar-metadata.properties.

The minCompileSdk (32) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.emoji2:emoji2-views-helper:1.2.0.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\1eb9e4f4f6c7d0b008d0f60a14776b2a\transformed\jetified-emoji2-views-helper-1.2.0\META-INF\com\android\build\gradle\aar-metadata.properties.

The minCompileSdk (32) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.emoji2:emoji2:1.2.0.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\eabe6fc141c834f21f0cf0c459656a3f\transformed\jetified-emoji2-1.2.0\META-INF\com\android\build\gradle\aar-metadata.properties.

The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.core:core-ktx:1.9.0.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\51c31fe6fe3992d1feeb9e44ff070b27\transformed\jetified-core-ktx-1.9.0\META-INF\com\android\build\gradle\aar-metadata.properties.

The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.core:core:1.9.0.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\7cdaa17a44f0d5cc286211d87e4b6516\transformed\core-1.9.0\META-INF\com\android\build\gradle\aar-metadata.properties.

The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.annotation:annotation-experimental:1.3.0.
AAR metadata file: C:\Users\Administrator\.gradle\caches\transforms-3\f365fcfdd355318934ac9ebc497ec1c5\transformed\jetified-annotation-experimental-1.3.0\META-INF\com\android\build\gradle\aar-metadata.properties.

我的构建版本是

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.example.artesting"
        minSdk 21
        targetSdk 31
        versionCode 1
        versionName "1.0"
    }
}

我正在尝试运行/执行我的应用程序以查看结果

xriantvc

xriantvc1#

您需要将compileSdktargetSdk设置为33

android {
    compileSdk 33
    defaultConfig {
        applicationId "com.example.artesting"
        minSdk 21
        targetSdk 33
        versionCode 1
        versionName "1.0"
    }
}

相关问题