I was trying to build a navigation drawer for which I copied code from some website and I am getting this error in one of the XMLs.
No resource found
Click on the newly created "dimens.xml" file. Remove all code in it and paste the following:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="activity_vertical_margin">8dp</dimen>
<dimen name="activity_horizontal_margin">8dp</dimen>
</resources>
that's should work
Make sure you copied the dimens.xml
file too.
In some project templates you find app/src/main/res/values/dimens.xml
with only one value:
<resources>
<dimen name="fab_margin">16dp</dimen>
</resources>
So you need to add the missing ones to that file:
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
Hope this helps.