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

  • 降级依赖库版本

成功解决🤗

相关推荐
夜微凉41 小时前
三、MySQL
android·数据库·mysql
我命由我123452 小时前
Android 开发问题:项目同时引入了两个包含相同类文件的库(AndroidX 库、旧版本支持库),导致了重复类错误
android·java·java-ee·android studio·android-studio·androidx·android runtime
anthonyzhu2 小时前
安卓Android studio panda run无法应用更新的问题
android·ide·android studio
jingling5553 小时前
Flutter | Dio网络请求实战
android·开发语言·前端·flutter
帅次3 小时前
讯飞与腾讯云:Android 实时语音识别服务对比选择
android·ios·微信小程序·小程序·android studio·android runtime
jiayong234 小时前
MySQL 排序规则冲突问题与 utf8mb4_general_ci 统一方案
android·mysql·ci/cd
随遇丿而安5 小时前
第6周:RecyclerView 真正难的不是“写个列表”,而是让列表在复用中保持正确
android
晓梦林5 小时前
EVA靶场学习笔记
android·笔记·学习
私人珍藏库5 小时前
【Android】抖音无水印下载安卓端 轻载 QingZai v1.0.4
android·app·工具·软件·多功能
qq3621967056 小时前
Twitter官网下载安装指南:2026最新安卓版APK教程
android·twitter