error in pubsec.yaml file

561 views
Skip to first unread message

Shrishti Gupta

unread,
Jul 24, 2020, 6:25:41 AM7/24/20
to Flutter Development (flutter-dev)
Error: unable to locate asset entry in pubspec.yaml: "fonts/Pacifico-Regular.ttf".


pubsec.png


This message pops up whenever I run my flutter app.

error.png

Graham Dickinson

unread,
Jul 24, 2020, 7:02:06 AM7/24/20
to Flutter Development (flutter-dev)
Is there a file named Pacifico-Regular.ttf in folder <your project name>/assets/fonts/   ?

Graham Dickinson

unread,
Jul 24, 2020, 7:05:27 AM7/24/20
to Flutter Development (flutter-dev)
...although I think it is looking for it in folder  <your project name>/fonts/ 

You need to decide where to put the file and how to reference it.

Shrishti Gupta

unread,
Jul 24, 2020, 8:54:51 AM7/24/20
to Flutter Development (flutter-dev)
yes there is. I am trying to add custom fonts

Andy Greenshaw

unread,
Jul 24, 2020, 9:06:09 AM7/24/20
to Flutter Development (flutter-dev), Shrishti Gupta
You have “Pacifico.ttf” in your fonts folder, not “Pacifico-Regular.ttf” as you have put in Pubspec.yaml.

Cheers,
Andy
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/f480a931-1ebe-4755-a471-e4aaa2d69b85o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages