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:

  1. 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).

  2. 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.

  3. 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).

  4. 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.

  5. 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).

  6. 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.

  7. 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).

  8. 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

  • 降级依赖库版本

成功解决🤗

相关推荐
HalvmånEver1 小时前
MySQL的索引
android·linux·数据库·学习·mysql
赏金术士5 小时前
Kotlin 从入门到进阶 之作用域函数 & 优雅写法(五)
android·开发语言·kotlin
Ehtan_Zheng7 小时前
Android Compose 动画实践:内容切换与页面转场
android
Crystal3288 小时前
【终极指南】前端方面解决 uni-app APP 端 SSE 流式请求被缓冲拦截、无法实时渲染的问题
android·前端·ai编程
陆业聪9 小时前
技术选型决策树:什么团队、什么项目该选什么框架 | 跨平台框架深度对决(4)
android·架构设计
JohnnyDeng9410 小时前
Kotlin 协程原理与 Android 中的最佳实践
android·kotlin·协程
Aleyn10 小时前
用 KSP 给 Navigation 3 加一层「跨模块路由」:nav3-helper 设计与使用
android·android jetpack·composer
GeekBug10 小时前
Claude Code 如何帮我写 80% 的 Android 样板代码
android·claude
dora10 小时前
手把手带你实现一个Android抽卡集图鉴功能
android