简体   繁体   中英

while running the application One or more issues found when checking AAR metadata values

I am making Gmail application using javamail API. When I added these libraries it is saying One or more issues found when checking AAR metadata values: build.gradle

plugins {
    id 'com.android.application'
}
android {
    compileSdk 31
    defaultConfig {
        applicationId "com.example.software2.sample"
        minSdk 22
        targetSdk 31
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildToolsVersion '31.0.0'
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.core:core-ktx:1.9.0'
    implementation files('libs/activation.jar')
    implementation files('libs/additionnal.jar')
    implementation files('libs/mail.jar')
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

Following issues are appears:

One or more issues found when checking AAR metadata values:

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.appcompat:appcompat-resources:1.5.1. AAR metadata file: C:\Users\Rushikesh.gradle\caches\transforms-3\63bd602bbd077db6fa33982f975ba9a9\transformed\jetified-appcompat-resources-1.5.1\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.appcompat:appcompat:1.5.1. AAR metadata file: C:\Users\Rushikesh.gradle\caches\transforms-3\92893fee921d4827887eec16e205d3d5\transformed\appcompat-1.5.1\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\Rushikesh.gradle\caches\transforms-3\4ae05e0043a542b94a1819b5f9f97771\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\Rushikesh.gradle\caches\transforms-3\c68bf547d8153864e116103b3c54fbba\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:1.9.0. AAR metadata file: C:\Users\Rushikesh.gradle\caches\transforms-3\acd99a442914ab71e729da423f1b38d1\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.core:core-ktx:1.9.0. AAR metadata file: C:\Users\Rushikesh.gradle\caches\transforms-3\24dbdd1120e9c289188c7e6e855e6468\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.annotation:annotation-experimental:1.3.0. AAR metadata file: C:\Users\Rushikesh.gradle\caches\transforms-3\0c48b9042d6344e832766a1eebc1f197\transformed\jetified-annotation-experimental-1.3.0\META-INF\com\android\build.gradle\aar-metadata.properties.

You are using dependencies which configured with greater minCompileSdk than your chosen compileSdk 31.

eg

implementation 'androidx.appcompat:appcompat:1.5.1'

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.appcompat:appcompat-resources:1.5.1. AAR metadata file:

Try some older versions of these dependencies with fitting minCompileSdk.

EDIT: Or upgrade your compileSdk to 33.

Also have a look at Android app won't build -- The minCompileSdk (31) specified in a dependency's androidx.work:work-runtime:2.7.0-beta01

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM