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

  • 降级依赖库版本

成功解决🤗

相关推荐
alexhilton几秒前
Kotlin DSL深度解析:从Gradle脚本到构建你自己的DSL
android·kotlin·android jetpack
烽火聊员21 分钟前
查看Android Studio错误日志
android·ide·android studio
星空语6 小时前
音频001_Android+Linux车载/手机音频全链路分层架构图
android·linux·音视频
CyL_Cly6 小时前
解决官网下载慢!Android Studio 最新版网盘下载
android·ide·android studio
智塑未来6 小时前
鸿蒙系统对比安卓、iOS,核心优势是什么?
android·ios·harmonyos
AI刀刀6 小时前
豆包智能体对话导出后,如何构建长期归档与高效检索体系?
android·人工智能·word·excel·ai导出鸭
初雪云8 小时前
iOS 上架入门:证书、描述文件、IPA 上传到底是什么关系?
android·ios·自动化·产品经理·iphone
玩机达人8810 小时前
一加12/Ace5/Ace3pro手机ColorOS16降级回锁BL熔断变黑砖怎么办
android·智能手机·电脑
Digitally11 小时前
使用 USB 数据线将文件从安卓设备传输到电脑
android·电脑
xieliyu.12 小时前
MySQL 六大基础约束详解:NOT NULL/DEFAULT/UNIQUE/ 主键 / 外键 / CHECK
android·数据库·sql·mysql