问题
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):
- Check that its constraints are set using
app:layout_editor_absoluteX="(whatever)dp"
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