Infer Constraints in Android studio latest version(3.0)

别说谁变了你拦得住时间么 提交于 2019-12-11 06:48:41

问题


In this image there is a wiggy line to the button. Usually in the previous android version I used to select infer constraints so that the wiggy line gets disappeared. Now in the latest android version there is no option for infer constraints. Is there any other alternative to remove wiggy line?


回答1:


You can use infer constraint in Android Studio 3.0

Just make sure you are in the "Design" tab and not the "Text" tab (seen near the bottom of the screen).

Click on infer constraints




回答2:


There IS an option to infer constraints: a little "magic wand" icon at the top next to the "magnet" does this for you now.




回答3:


Happened to me as well.

Go into the layout .xml file for the Activity and select the Text tab. Find the component(s):

  1. Check that its constraints are set using app:layout_editor_absoluteX="(whatever)dp"
  2. Check that it doesn't have conflicting constraints like:

    app:layout_editor_absoluteX="1dp" tools:layout_editor_absoluteX="1dp"

    Even if the "dp" value is the same, Android Studio will give you an error.

Hope this helps!



来源:https://stackoverflow.com/questions/46977540/infer-constraints-in-android-studio-latest-version3-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!