在使用Android Studio菜单选项Refactor -> Refactor to Androidx迁移到Androidx包之后...
我得到以下错误:
Error inflating class androidx.constraintlayout.widget.ConstraintLayout
发布于 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'
发布于 2021-05-12 22:58:16
我遇到了同样的问题,上面的解决方案都没有奏效。事实上,这个问题是由应用程序使用ActionBar to setTitle()时切换到NoActionBar主题后抛出的空指针异常引起的。The linked stack overflow answer helped me figure it out
发布于 2019-01-25 18:18:43
Android Studio更新了3.3版。请删除以前版本的constraintLayout
我的案例使用了这个
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
谢谢
https://stackoverflow.com/questions/50783810
复制相似问题