skip to Main Content
Error: Couldn't resolve the package 'google_fonts' in 'package:google_fonts/src/asset_manifest.dart'.
/C:/src/flutter/packages/flutter/lib/src/services/asset_manifest.dart:7:8: Error: Not found: 'package:google_fonts/src/asset_manifest.dart'
import 'package:google_fonts/src/asset_manifest.dart' as google_fonts_asset_manifest;
       ^
Unhandled exception:
Null check operator used on a null value
#0      IncrementalJavaScriptBundler.compile (package:frontend_server/src/javascript_bundle.dart:227:69)
#1      FrontendCompiler.writeJavaScriptBundle (package:frontend_server/frontend_server.dart:778:46)
<asynchronous suspension>
#2      FrontendCompiler.compile (package:frontend_server/frontend_server.dart:641:9)
<asynchronous suspension>
#3      listenAndCompile.<anonymous closure> (package:frontend_server/frontend_server.dart:1308:11)
<asynchronous suspension>
Finished with error: the Dart compiler exited unexpectedly.
Failed to compile application.

Could you please help me? My work has been delayed for a few days😭

I do this process

  • cmd: Flutter clean
  • cmd: Flutter pub get
  • cmd: Fultter packages get

But here it’s not work place help me **

[Error show here….]

2

Answers


    • Make sure you are added google_fonts: latest_version in pubspec.yaml file:
    dependencies:
      flutter:
        sdk: flutter
      google_fonts: ^replace_with_latest_version
    
    • If not available:
      Run the following command in the project directory:
    flutter pub add google_fonts
    

    or add a line like this to your package’s pubspec.yaml (and run an implicit flutter pub get)

    dependencies:
      google_fonts: ^5.1.0
    
    Login or Signup to reply.
  1. I had this problem but with other packages
    I solved my problem by opening the Android folder and syncing Gradle again

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search