android 编译问题记录

最近在创建android 项目时遇到了一个报错,晕的一批,不知道怎么解决,但是又无意之间找到了解决方法。做一下记录, 按照提示, 升级一下 gradle 版本就好了。

vbnet 复制代码
3 issues were found when checking AAR metadata:

  1.  Dependency 'androidx.core:core-ktx:1.19.0' requires libraries and applications that
      depend on it to compile against version 37 or later of the
      Android APIs.

      :app is currently compiled against android-36.1.

      Recommended action: Update this project to use a newer compileSdk
      of 37.

      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.core:core:1.19.0' requires libraries and applications that
      depend on it to compile against version 37 or later of the
      Android APIs.

      :app is currently compiled against android-36.1.

      Recommended action: Update this project to use a newer compileSdk
      of 37.

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

  3.  Dependency 'androidx.lifecycle:lifecycle-runtime-compose-android:2.11.0' requires libraries and applications that
      depend on it to compile against version 37 or later of the
      Android APIs.

      :app is currently compiled against android-36.1.

      Recommended action: Update this project to use a newer compileSdk
      of 37.

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

解决方法: 1.

  1. 安装 37.1 sdk
相关推荐
bobuddy2 小时前
平台总线(platform bus)
android
plainGeekDev2 小时前
libs 目录 → Gradle 依赖管理
android·java·kotlin
帅次3 小时前
Android 高级工程师面试:Flutter Widget 体系 近1年高频追问 20 题
android·flutter·面试·element·widget·setstate·renderobject
帅次3 小时前
Android 高级工程师面试:Jetpack 核心 近1年高频追问 20 题
android·面试·协程·jetpack·stateflow·lifecycle
爱笑鱼4 小时前
Handler(四):Handler 卡顿怎么定位?从 Slow delivery 到 Slow dispatch
android
九皇叔叔5 小时前
RHEL9.8 配置本地镜像仓库
android·java·缓存
私人珍藏库5 小时前
[Android] 聊天记录微备份 -聊天记录备份+本地数据备份
android·人工智能·app·软件·多功能
私人珍藏库6 小时前
[Android] PocketPal -本地离线AI助手+大模型部署神器
android·人工智能·app·软件·多功能
listening7777 小时前
HarmonyOS 6.1 跨端实战:用ArkUI-X把电商App同时跑在Android/iOS上
android·ios·harmonyos