Constraint Layout gives error in default template in Android Studio 2.3
Go to Design, right-click on relative layout and select Constraint layout-->Infer Constraints
Drag the object to connect to the walls...Create connections between walls and object
Look at the image example