错误记录Android Studio 编译报错 ( The minCompileSdk (31) specified in a dependency‘s AAR metadata (META- )
Posted 韩曙亮
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误记录Android Studio 编译报错 ( The minCompileSdk (31) specified in a dependency‘s AAR metadata (META- )相关的知识,希望对你有一定的参考价值。
文章目录
一、报错信息
编译 android Studio 工程时 , 报如下错误 ;
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> 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-28).
Dependency: androidx.appcompat:appcompat:1.4.1.
AAR metadata file: C:\\Users\\octop\\.gradle\\caches\\transforms-2\\files-2.1\\8e0e08f73cb1db91835eb81ec877eaf8\\appcompat-1.4.1\\META-INF\\com\\android\\build\\gradle\\aar-metadata.properties.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 836ms
二、解决方案
报错时说明 androidx.appcompat:appcompat:1.4.1. 依赖库必须以 android-31 进行编译 , 这里降低该依赖库的版本到 ‘androidx.appcompat:appcompat:1.0.0’ 即可 ;
以上是关于错误记录Android Studio 编译报错 ( The minCompileSdk (31) specified in a dependency‘s AAR metadata (META- )的主要内容,如果未能解决你的问题,请参考以下文章
错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段
错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段
错误记录Android Studio 编译时 Kotlin 代码编译报错 ( 升级支持库时处理 @NonNull 参数 )
错误记录Android Studio 编译报错 ( Invalid main APK outputs : EarlySyncBuildOutput )
错误记录Android Studio 编译报错 ( Invalid Gradle JDK configuration found )
错误记录Android Studio 编译报错 ( VirtualApp 编译 NDK 报错 | Error:A problem occurred configuring project ‘: )(代