首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到类"android.support.constraint.Barrier“

找不到类"android.support.constraint.Barrier“
EN

Stack Overflow用户
提问于 2019-02-08 23:20:07
回答 1查看 714关注 0票数 5

我正在尝试使用ConstraintLayout中的Barrier视图

代码语言:javascript
复制
<android.support.constraint.Barrier
    android:id="@+id/buttonBarrier"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:barrierDirection="top"
    app:constraint_referenced_ids="answer1Button,answer2Button"
    />

它在IDE中工作得很好,并且我得到了Barrier特定的lint消息。但当我运行这个应用程序时,它在试图膨胀包含Barrier的布局时崩溃:

代码语言:javascript
复制
java.lang.ClassNotFoundException: Didn't find class "android.support.constraint.Barrier"

我使用的是AndroidX ConstraintLayout 1.1.3:

代码语言:javascript
复制
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

这是怎么回事?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-02-08 23:28:47

在最新的AndroidX版本中,xml标记是androidx.constraintlayout.widget.Barrier

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

https://stackoverflow.com/questions/54595453

复制
相关文章

相似问题

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