ConstraintLayout报错——This view is not constrained解决方法

报错信息

Error: This view is not constrained, it only has design time positions, so it will jump to (0,0) unless you add constraints

解决方法

src/main/res/layout/下打开xml文件,然后:
在这里插入图片描述
然后设置Infer Constraints,怕你们找不到,附一张图:
在这里插入图片描述

发布了36 篇原创文章 · 获赞 41 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/umbrellalalalala/article/details/88532636