前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >检查AAR元数据时发现问题

检查AAR元数据时发现问题

作者头像
Gujiu
发布2023-10-18 14:22:28
2.5K0
发布2023-10-18 14:22:28
举报
文章被收录于专栏:Gujiu's BlogGujiu's Blog

问题

An issue was found when checking AAR metadata:

  1. Dependency 'androidx.activity:activity:1.8.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 34. 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).

对于上述报错的翻译

检查AAR元数据时发现一个问题: 1.依赖项“androidx.activity:activity:1.8.0”要求库和应用程序 依赖它来编译的版本34或更高版本 Android API。 :该应用程序目前是针对android-33编译的。 建议操作:更新此项目以使用更新的compileSdk 例如34。 请注意,更新库或应用程序的compileSdk( 允许使用更新的API)可以与更新分开进行 targetSdk(将应用程序选择为新的运行时行为)和 minSdk(用于确定应用程序可以安装的设备 on)。

解决办法

因此只需要对gradle的配置文件进行修改

image.png
image.png

打开红框文件

image.png
image.png

将其的33修改为34(图片已经修改过了)

如果你在修改完成以后无法运行软件到虚拟机 不要忘记进行sycn

结语

Android开发真奇妙

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 问题
  • 解决办法
  • 结语
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档