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.
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.
- [Solved] android Execution failed for task ‘:app:processDebugManifest‘
- [Solved] Android Could not determine artifacts for XXXX: Skipped due to earlier error
- Project Startup Error: It was loaded from the following location
- Android solution Java.util.concurrent.ExecutionException: com.Android.ide.common.process.ProcessException: exception
- Kotlin activity Startup and Compile Error [How to Solve]
- Android Studio Cannot resolve symbol [How to Solve]
- Flutter: How to Fix Android module can’t recognize flutter SDK source code
- java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x590
- [Solved] Java.lang.BootstrapMethodError: call site initialization exception
- [Solved] Jedis connect and operate Redis error: Failed to create socket和connect timed out
- [Solved] AS Error: Error inflating class android.support.v4.view.ViewPager
- Android Studio Error: Error:moudle not specified [How to Solve]
- [Solved] Error:Cannot determine path to ‘tools.jar‘ library for 17
- Gradle Compile Error: compileJava FAILED [How to Solve]
- How to Solve Mybatisplusinterceptor error
- Flutter FAQ-Error retrieving device properties for ro.product.cpu.abi
- SpringBoot Startup Error: Failed to start component [Connector[HTTP/1.1-8080]]
- [Solved] Android project Compile error: error processing kotlin-stdlib-1.6.0.jar
- How to Solve Log4j 2.5 upgrade to 2.15 error
- How to Solve Spring integrate Seata startup error