Kinda Code
Home/Flutter/Flutter error: Could not resolve the package ‘characters’ in…

Flutter error: Could not resolve the package ‘characters’ in…

Last updated: February 06, 2023

Problem

When running a Flutter app, you may see this error message:

Could not resolve the package 'characters' in 'package:characters/characters.dart'

This often occurs after upgrading Flutter to a newer version.

Solution

To fix the mentioned error, just upgrade all the dependencies listed in the pubspec.yaml file by performing the following commands:

flutter clean

Then:

flutter pub upgrade

You will see something like this in your console window:

Resolving dependencies...
  async 2.8.2
  boolean_selector 2.1.0
  characters 1.2.0
  ...

Finally, start your app up:

flutter run

Hope this could help you.

Further reading:

You can also check out our Flutter category page or Dart category page for the latest tutorials and examples.