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.appcompat:appcompat:1.4.0.
AAR metadata file: C:\Users\23737\Android_apk\caches\transforms-2\files-2.1\8f4b7ca2bae2afe820e06df077d8d5c8\appcompat-1.4.0\META-INF\com\android\build\gradle\aar-metadata.properties.
解决办法:
把compileSdkVersion 30改成 31 就好了