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

  • 降级依赖库版本

成功解决🤗

相关推荐
AFinalStone10 小时前
Android 7系统休眠唤醒(六)唤醒全链路
android·电源管理·休眠唤醒
雨白10 小时前
深入理解 Kotlin 协程 (九):互通有无,解构 Channel 缓冲策略与底层无锁机制
android·kotlin
灯塔@kuaidao12 小时前
平台交叉编译名词解释与基础流程
android
__Witheart__13 小时前
3568 Android otg模式下adb热拔插不识别
android·adb·rockchip
明天…ling15 小时前
Upload-Labs (Pass1-Pass21) 完整通关思路与源码分析
android·网络安全·渗透测试·burpsuite·upload-labs·文件上传绕过·靶场复现
__Witheart__15 小时前
3568 Android ntp校时使用
android·rockchip
wddptwd2816 小时前
android studio 报错怎么处理 java.lang.NullPointerException
android·java·android studio
美狐美颜SDK开放平台16 小时前
直播APP开发,美颜SDK和相机SDK有什么区别?
android·深度学习·数码相机·ios·直播美颜sdk·视频美颜sdk
唐诺17 小时前
Android Open Accessory (AOA) 协议完全解析
android·usb·aoa
我命由我1234519 小时前
Android 开发 - 广播组件(标准广播、有序广播、静态注册广播、分钟到达广播、网络变更广播...)
android·java·开发语言·网络·java-ee·android studio·android-studio