首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >膨胀类androidx.constraintlayout.widget.ConstraintLayout时出错

膨胀类androidx.constraintlayout.widget.ConstraintLayout时出错
EN

Stack Overflow用户
提问于 2018-06-10 20:44:15
回答 6查看 39.6K关注 0票数 46

在使用Android Studio菜单选项Refactor -> Refactor to Androidx迁移到Androidx包之后...

我得到以下错误:

Error inflating class androidx.constraintlayout.widget.ConstraintLayout
EN

回答 6

Stack Overflow用户

发布于 2019-01-24 19:47:29

由于Android Studio已更新到3.3,因此将弹出此错误。我通过在应用级别的build.gradle中升级constraint layout的版本来解决:

implementation 'androidx.constraintlayout:constraintlayout:1.1.2'

implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

票数 2
EN

Stack Overflow用户

发布于 2021-05-12 22:58:16

我遇到了同样的问题,上面的解决方案都没有奏效。事实上,这个问题是由应用程序使用ActionBar to setTitle()时切换到NoActionBar主题后抛出的空指针异常引起的。The linked stack overflow answer helped me figure it out

票数 1
EN

Stack Overflow用户

发布于 2019-01-25 18:18:43

Android Studio更新了3.3版。请删除以前版本的constraintLayout

我的案例使用了这个

implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'

谢谢

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50783810

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档