This view not constrained.It only has designative positions错误信息解决方法

This view not constrained.It only has designative positions, so it will jump to(0,0) at runtime unless you add the contraints.

坑坑不止的Android Studio。
之前一直为了更好的了解这些控件的原理呀,一直没去尝试Android Studio的拖拉拽风格。
今个当我的按钮都重叠起来的时候,我就想着呢,嗯,显示在layout中加入垂直布局,完全没作用。。又觉得一个个设置位置也怪麻烦的。

行吧,我去试试强大的拖拉拽吧!
以为可以一帆风顺搞定布局问题,可是呢,坑坑的as是不会白白放过我这个安卓小白白的。
刚一拉,程序就报错了。给我提示出这样的信息,This view not constrained.It only has designative positions, so it will jump to(0,0) at runtime unless you add the contraints.
这里写图片描述
这里写图片描述

去找了找一些博客发现呀,能找到这个infer Constraints(所有按钮不重叠)就可以解决问题了,但是我的as版本可能不符,我找不到呀。就想着去视图那里面找找一些功能键吧,兴许能被我撞到呢。反正知道有这个功能,不在控件的下拉菜单,也就只能找工具栏去了。

是的呢,还真在这里面:
这里写图片描述

小魔法棒很厉害。
这样错误就会消失了。

猜你喜欢

转载自blog.csdn.net/ancientear/article/details/81121247
今日推荐