How to Fix 'AssetManifest' is imported from both 'package:flutter...' and 'package:google_fonts...' error


In this article I'll share with you how to fix'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.. and 'package:google_fonts/src/asset_manifest.dart'.

When you run your flutter app you might notice this error in your debug console.

Launching lib/main.dart on SM A225M in debug mode...
Warning: Errors limit exceeded. To receive all errors set com.sun.xml.bind logger to FINEST level.
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
: Error: 'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
import 'asset_manifest.dart';


Fortunately, this is a simple fix, update your google_fonts: package in pubspec.yaml to the latest version

Run your Flutter app and your code should be fine.

Connect with me

Thank you for reading my post. Feel free to like, comment, subscribe