Android studio Error in building custom font with support lib v26

173 Views Asked by At

I am studying to add custom font for different locale.

In Android O, it support font in xml. Also find that we can use the support library to load font in xml backward compatiblity to API >14.

Support library font

I am now using Android Studio 3.0 Beta2 and add the font folder under the res directory.

But building the project, it shows error for the notosanscjktc_medium.otf is not allowed to declared in this.

enter image description here

The android documentation seems not clearly enough for the support library case where to put the font file. Does anyone know where to put the custom font file?

Updated: Thank you to Junaid Hafeez giving me some hint.

My project is created in Android Studio 2.3.3. Even though later i open it with Android 3.0 , the gradle file usage is old. Now i updated my gradle to use the same as 3.0 using implementation. It now works.

0

There are 0 best solutions below