I am running Android Studio (put on latest stabel upgrade the other day. When I use the Layout editor it seems to prefer ConstraintLayout. When I move two widgets (one TextView and one button) around it looks all right on the editor, but when I try to it in an emulator device (Nexus 4) they both ends up in the Upper right corner. Same thing on my real device. Is there some version problem here?


Please check ConstraintLayout here:

https://developer.android.com/training/constraint-layout/index.html

When you drop a view into the Layout Editor, it stays where you leave it even if it has no constraints. However, this is only to make editing easier; if a view has no constraints when you run your layout on a device, it is drawn at position [0,0] (the top-left corner).

In other words, it means you must add at least one horizontal and one vertical constraint for the view