You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AndroidX依赖解析失败:androidx.core:core-ui无法找到,求ConstraintLayout Group对应依赖

解决ConstraintLayout Group的AndroidX依赖问题

嘿,这个问题我之前也碰到过!Android Studio自动给你加的androidx.core:core-ui:+确实是个错误的依赖,因为ConstraintLayout Group本身就是包含在AndroidX版本的ConstraintLayout库里面的,根本不需要单独引入core-ui。

你只需要做这两步:

  1. 删掉自动生成的错误依赖implementation 'androidx.core:core-ui:+'
  2. 确保项目里引入了正确的AndroidX版ConstraintLayout依赖(可以用当前最新的版本号,比如2.1.4或更高):
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

为啥会出现这个乌龙呢?大概率是Android Studio的小bug,它误把Group的依赖关联到了core-ui,但实际上从ConstraintLayout 2.0版本开始,Group组件就已经整合到AndroidX的ConstraintLayout库中了。只要你用的是AndroidX版本的ConstraintLayout,就能直接使用Group,完全不需要退回到旧的support库,完美符合AndroidX迁移的要求。

内容的提问来源于stack exchange,提问作者h0102

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 09:18:09