文章目录
- [8 issues were found when checking AAR metadata:](#8 issues were found when checking AAR metadata:)
8 issues were found when checking AAR metadata:
1.问题描述

8 issues were found when checking AAR metadata:
-
Dependency 'androidx.activity:activity:1.13.0' requires libraries and applications that
depend on it to compile against version 36 or later of the
Android APIs.
: app is currently compiled against android-35.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.8.0 is 35.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 36, then update this project to use
compileSdk of at least 36.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
-
Dependency 'androidx.activity:activity:1.13.0' requires Android Gradle plugin 8.9.1 or higher.
This build currently uses Android Gradle plugin 8.8.0.
-
Dependency 'androidx.core:core:1.18.0' requires libraries and applications that
depend on it to compile against version 36 or later of the
Android APIs.
: app is currently compiled against android-35.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.8.0 is 35.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 36, then update this project to use
compileSdk of at least 36.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
-
Dependency 'androidx.core:core:1.18.0' requires Android Gradle plugin 8.9.1 or higher.
This build currently uses Android Gradle plugin 8.8.0.
-
Dependency 'androidx.core:core-ktx:1.18.0' requires libraries and applications that
depend on it to compile against version 36 or later of the
Android APIs.
: app is currently compiled against android-35.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.8.0 is 35.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 36, then update this project to use
compileSdk of at least 36.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
-
Dependency 'androidx.core:core-ktx:1.18.0' requires Android Gradle plugin 8.9.1 or higher.
This build currently uses Android Gradle plugin 8.8.0.
-
Dependency 'androidx.navigationevent:navigationevent-android:1.0.0' requires libraries and applications that
depend on it to compile against version 36 or later of the
Android APIs.
: app is currently compiled against android-35.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.8.0 is 35.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 36, then update this project to use
compileSdk of at least 36.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
-
Dependency 'androidx.navigationevent:navigationevent-android:1.0.0' requires Android Gradle plugin 8.9.1 or higher.
This build currently uses Android Gradle plugin 8.8.0.
2.解决办法
上述问题的根本原因是依赖库之间的版本存在冲突。解决办法有两种,一种是升级 agp 的版本,但是本人当前在学习阶段,为了与资料保持一致性,故没有选择升级 agp。所以进行了依赖库的降级,修改位置如下所示:
-
升级
compileSdk为 36
-
降级依赖库版本

成功解决🤗