skip to Main Content

In the beginning, I had an error that states: "Dart library ‘dart:ui’ is not available on this platform".

I’m running it on Android which is supported by flutter, so I made sure that I have the latest version of Flutter and Dart SDK installed. But the error was still there, this time I tried to run "flutter clean" but this error showed up: "No pubspec.yaml file found" and asked me to run it from the root of my project. Finally, I opened the command prompt and tried to navigate to the root directory, I’m not sure if it’s right though: "C:UsersphDRaOneDriveDesktopApotheke" but unfortunately, I had the same error.
I’m not sure if these steps are correct, but after that I was planning to run "flutter pub get", though I don’t know where, and then I think the problem will be solved.

2

Answers


  1. Root directory is the same address u used when you ran

    Flutter create <project_name>
    

    And the same address u use to open the vs code folder

    So i think it will be easier if u just fun

    Flutter clear
    

    From the vs code terminal

    Login or Signup to reply.
  2. Its to simple.
    open terminal in project directory and run this command
    flutter clean.
    the terminal could be CMD or power-Shell if you are on windows or
    if you are on Linux or Mac you could use bash or zsh

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search