Package import - Target of URI does not exists Package import - Target of URI does not exists dart dart

Package import - Target of URI does not exists


I know this is an old question, but I came across it and resolved it. But anyone that runs into this, simply close your project and reopen it. That solved it for me. I'm using Android Studio.


I had the same problem when using Visual Code and following the Write your first app tutorial. This issue was resolved by just closing and reopening the project.


If you are using Android Studio do like this:

enter image description here

  • Click on Dart Analysis on the bottom
  • Click on the Restart Dart Analysis Server icon on the left side of the window.

The errors will be fixed