Flutter markdown package dependency did not install correctly for me
898
I solved this thanks to @raju-bitter comment. Steps:
- Close your IDE (Android Studio/Intellij Idea/etc)
Remove the cache directory (My was located at C:\Users\Username\AppData\Roaming\Pub)
Reopen your IDE.
If you still get an error then execute flutter package get
in your terminal or from IDE menu.
Author by
ZeroProcess
Updated on December 02, 2022Comments
-
ZeroProcess over 1 year
I wan to use flutter markdown package, but I can't. I added dependency (in pubspec.yaml):
dependencies: flutter_markdown: "^0.0.9"
After I upgraded package and dependency, but when I used
import 'package:flutter_markdown/flutter_markdown.dart';
statement I got error message URI doesn't exist. I upgraded flutter and tried again, but nothing. I tried adding another way:
dependencies: flutter_markdown: git: "https://github.com/flutter/flutter_markdown.git"
But result is the same.
How can I solve this problem?
(I use other packages without problem.)
-
Günter Zöchbauer almost 7 yearsHave you tried restarting Intellij?
-
Collin Jackson almost 7 yearsAdding a dependency on flutter_markdown: "^0.0.9" as you've shown worked fine for me. Can you show a screenshot of the error message you're encountering?
-
ZeroProcess almost 7 yearsYes I tried restarting.
-
ZeroProcess almost 7 years
-
raju-bitter almost 7 yearsI had a similar experience yesterday with another package. After completely removing the ~/.pub-cache folder, restarting IntelliJ, and running
flutter package get
again it worked. -
raju-bitter almost 7 yearsDo you see the Dart package in the list of External Libraries - Dart Packages inside IntelliJ? And can you see the package folder inside your
.pub-cache
folder, e.g. ~/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.0.9/? -
Günter Zöchbauer almost 7 yearsRemoving
~/.pub-cache
is a bit radical. I'd try that last and also try runningpub cache repair
first. -
raju-bitter almost 7 yearsTried that, but didn't solve my problem.
-
Seth Ladd almost 7 yearsDid you run
flutter packages get
on the command line, after you added the dependency to your pubspec.yaml ?
-