DEV Community

Curtly Critchlow
Curtly Critchlow

Posted on

13

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

Indroduction

In this article I'll share with you how to fix'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' 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...
main.dart:1
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'.
google_fonts_base.dart:14
import 'asset_manifest.dart';
^^^^^^^^^^^^^
Enter fullscreen mode Exit fullscreen mode

Solution

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 or connect with me on LinkedIn and Twitter. You can also buy me a book to show your support.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Sentry mobile image

Improving mobile performance, from slow screens to app start time

Based on our experience working with thousands of mobile developer teams, we developed a mobile monitoring maturity curve.

Read more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay