Issue
I want to set fontFamily
to roboto thin of my toolbar title.
I have added roboto thin ttf in assets/fonts
folder of my android project, however it seems that it is creating issues while running app. I am getting this issue while running
react-native start
ERROR EPERM: operation not permitted, lstat 'E:\Myntra\android\app\build\gener
ated\source\r\debug\android\support\v7\appcompat'
{"errno":-4048,"code":"EPERM","syscall":"lstat","path":"E:\\Myntra\\android\\app
\\build\\generated\\source\\r\\debug\\android\\support\\v7\\appcompat"}
Error: EPERM: operation not permitted, lstat 'E:\Myntra\android\app\build\genera
ted\source\r\debug\android\support\v7\appcompat'
at Error (native)
When I am removing the font then it is working fine. I am unable to fix this issue. What's the reason?
Solution
Add your fonts file in
Project folder/android/app/src/main/assets/fonts/font_name.ttf
- Restart the package manager using
react-native run-android
- Then you can use your font in your style e.g
fontFamily: 'font_name'
Check here for further examples Custom Font Examples
Answered By - Sport
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.