Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use fonts in my project: - "Error:Error: The file name must end with .xml"

I'm trying to add a font to my Android project, so I can use it via XML. Unfortunately, I'm getting this error message:

Error:Error: The file name must end with .xml

I followed every step of the official Android tutorial and somehow this error occurs and I can't fix it.

Here is this my error

like image 928
thelearner Avatar asked Oct 14 '17 14:10

thelearner


1 Answers

You can't add font.ttf file in Drawable folder

you need to create Assets folder in android you can create Assets folder like below image in Android studio

enter image description here

than create a font folder in Assets folder and put your custom font.ttf file in this folder like below image

enter image description here

like image 71
AskNilesh Avatar answered Sep 21 '22 20:09

AskNilesh