使用 ConstraintLayout 遇到的问题
This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime
ConstraintLayout是Android Studio 2.2中主要的新增功能之一,我们在使用时遇到了如上所述的问题,通过Design面板拖拽的组件报错。
解决方案:
在AndroidStudio升级到3.0 及以上版本时,按如下方法解决。
打开Design面板,在工具栏找到“Infer Constraints”按钮,点击即可。