Posts

Showing posts with the label constraints

Android Studio 3.1.3 Error: The view is not constrainted. How to solve this permanently?

Image
Clash Royale CLAN TAG #URR8PPP Android Studio 3.1.3 Error: The view is not constrainted. How to solve this permanently? Whenever I try to drag and drop "Button" or "TextView", it give the error message with a red exclamation mark. How to solve this permanently? enter image description here See also: stackoverflow.com/questions/42594033/… – CommonsWare 2 hours ago 2 Answers 2 It means exactly what it says, the view has no constraints set. The constraints are what set its position on the screen and relative position to other views. The way to fix the error is to add constraints, either with the GUI or in the XML file directly. For example, to make it centered at the top of the screen you could set the following attributes in the XML fil...