Error: unable to locate asset entry in pubspec.yaml: "fonts/googlesansebold.ttf"

190 Views Asked by At

I am facing problem with running my app. please help me guys. i tried to delete gradle and redownload it as recommended previously. i am using windows, and using Pixel XL API 33 to run

[Error: unable to locate asset entry in pubspec.yaml: "fonts/googlesansebold.ttf".][1]


FAILURE: Build failed with an exception.

* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 17s
Exception: Gradle task assembleDebug failed with exit code 1
1

There are 1 best solutions below

0
GeekyChick On
fonts:
    - family: Montserrat
      fonts:
        - asset: assets/fonts/Montserrat-Bold.ttf

Use like this. check your pubspec.yml