当前位置:   article > 正文

关于Android Studio3.5.2安卓应用布局Missing Constraints in ConstraintLayout错误解决方法_android studio missing constraints

android studio missing constraints

错误详细提示:This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections. Issue id: MissingConstraints

此视图不受约束。它只有设计时位置,因此它将在运行时跳转到(0,0),除非您添加约束,否则布局编辑器允许您将小部件放置在画布上的任何位置,并且它使用设计时属性(如布局编辑器绝对值)记录当前位置。这些属性在运行时不应用,因此如果在设备上推送布局,则小部件可能会显示在与编辑器中显示的位置不同的位置。要解决此问题,请通过从边缘连接拖动来确保小部件同时具有水平和垂直约束。问题id:缺少约束

出现这种错误的时候 ,我们的处理方式是,做一遍:拖拽界面中按钮四周的圆点,到你想要设置的相对距离

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/311562?site
推荐阅读
相关标签
  

闽ICP备14008679号