This worked for me, go to android studio, click on
res then right click on
values then click on *New* then click on *value resource file* and name it
dimens then click finish. After which you paste the below code
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="activity_horizontal_margin">5dp</dimen>
<dimen name="activity_vertical_margin">5dp</dimen>
</resources>