Description
Execution failed for task ':app:checkDebugAarMetadata'. > Multiple task action failures occurred: > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > 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.recyclerview:recyclerview:1.3.0-alpha02.
If you upgrade to compilesdk 31 according to the prompt, you are faced with a large number of Android 12 and below are not available, and upgrade the current jdk8 to jdk11 or above, but the set of source code was still available more than 2 months ago. Now it is not available for no reason, which is not in line with the routine.
If the current compilesdk is kept at 30 or 28, gradle compiles and passes, but the above error is reported when running debugging.
I can’t understand it.
Solution:
Take the following three steps to finally solve the problem
1. keep the current compilesdk at 30 or 28.
2. lower the corresponding version number of dependent components, such as dependency: Android. Recyclerview: recyclerview: 1.3.0-alpha02. Change the original version number of the corresponding gradle file from 1. + to 1.2. +, that is, lower the version number by one. Shape such as
The original gradle file is implementation 'androidx.recyclerview:recyclerview:1.+'// means 1.xx latest version, maybe 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 in that order Now read implementation 'androidx.recyclerview:recyclerview:1.2.+'// means 1.2.xx latest version, maybe 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5 in that order
3. After recompiling, debug and run again, and the prompt of the dependent component does not appear again, indicating that the modification is effective. By analogy, reduce the version number of other dependent components until similar prompt no longer appears, and the problem is solved.
Read More:
- [Solved] AndroidStudio Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
- [Solved] AndroidStudio libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined referen
- [Solved] Java.lang.BootstrapMethodError: call site initialization exception
- [Solved] Execution failed for task ‘:app:uploadCrashlyticsMappingFileRelease‘
- Android Studio Cannot resolve symbol [How to Solve]
- [Solved] Jedis connect and operate Redis error: Failed to create socket和connect timed out
- Flutter: How to Fix Android module can’t recognize flutter SDK source code
- [Solved] android Execution failed for task ‘:app:processDebugManifest‘
- Android solution Java.util.concurrent.ExecutionException: com.Android.ide.common.process.ProcessException: exception
- Kotlin activity Startup and Compile Error [How to Solve]
- [Solved] Android Could not determine artifacts for XXXX: Skipped due to earlier error
- [Solved] Jxls error: Cannot load XLS transformer. Please make sure a Transformer implementation is in classpath
- Project Startup Error: It was loaded from the following location
- [Solved] Resource compilation failed. Check logs for details.
- Android activity Fail to Switch to androidx AppCompatActivity Error
- Mybatisenumtypehandler upgrade error of mybatis plus
- Android studio compilation failed: java.util.concurrent.ExecutionException: com.android.ide.common.process.Process
- java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x590
- [Solved] JAVA Error: Error:A JNI error has occurred,please check your installation and try again
- [Solved] The Bean Validation API is on the classpath but no implementation could be found