news 2026/3/12 2:28:25

material3 问题:requires libraries and applications that depend on it to compile against version 35

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
material3 问题:requires libraries and applications that depend on it to compile against version 35
[versions] androidx-material3 = "1.4.0" [libraries] androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidx-material3" }
  • 在 Android 开发中,使用 Jetpack Compose 时,使用 material3 时,出现如下错误信息
13 issues were found when checking AAR metadata: 1. Dependency 'androidx.compose.material3:material3-android:1.4.0' requires libraries and applications that depend on it to compile against version 35 or later of the Android APIs. :app is currently compiled against android-34. Recommended action: Update this project to use a newer compileSdk of at least 35, for example 35. 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). ... Update minCompileSdk in modules with dependencies that require a higher minCompileSdk.
问题原因
  • material31.4.0版本要求compileSdk 35或更高版本,而当前项目为compileSdk 34
处理策略
  • 这里选择降级 material3 的版本,将1.4.0降级为1.3.2
// 原来是这样的 [versions] androidx-material3 = "1.4.0" [libraries] androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidx-material3" }
// 修改成这样 [versions] androidx-material3 = "1.3.2" [libraries] androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidx-material3" }
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/3/10 17:12:41

信息系统仿真:数据传输与网络仿真_(2).数据传输基础

数据传输基础 1. 数据传输的基本概念 1.1 数据传输的定义 数据传输是指在不同设备之间或同一设备内不同组件之间传输数据的过程。在信息系统仿真中,数据传输是核心环节之一,它涉及到数据的编码、传输、解码和验证等多个步骤。数据传输的效率和可靠性直…

作者头像 李华
网站建设 2026/3/11 15:43:59

AI产品经理:小白也能掌握的高薪职业,未来5年最值得all in

文章指出AI产品经理是未来5年最具前景的职业,将其分为工具型、应用型和专业型三个层次。针对想入行的人群,文章分析了常见的三种状态:观望者、探索者和跑偏者,并提出成为应用型AI产品经理的"三步学习法":夯实…

作者头像 李华
网站建设 2026/3/5 4:45:27

从零到一构建企业级云原生中间件:基于RocketMQ 5.0与Kubernetes Operator实现万亿级消息处理架构的设计与实践全流程深度拆解

深入剖析云原生Service Mesh数据平面Envoy核心架构:基于xDS协议与WebAssembly实现动态流量管理与安全策略的微服务治理实战指南 在云原生微服务架构的演进中,Service Mesh(服务网格)已成为处理服务间通信的标准基础设施。而在这一…

作者头像 李华
网站建设 2026/3/4 10:48:49

React Native + OpenHarmony:View布局容器组件

React Native OpenHarmony:View布局容器组件 摘要 本文深入探讨React Native中最核心的UI组件——View在OpenHarmony 6.0.0 (API 20)平台上的实现原理与实战应用。基于AtomGitDemos项目环境(React Native 0.72.5、TypeScript 4.8.4)&#…

作者头像 李华