MohammadBaqer
MohammadBaqer

Reputation: 1415

can't run flutter project on chrome

I created a sample flutter project and I want to see the result in chrome.

when I run main.dart on chrome I get a white blank page as result!

here is my flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
Flutter (Channel stable, 3.3.0, on Ubuntu 22.04.1 LTS 5.15.0-56- 
generic,locale en_US.UTF-8)
Android toolchain - develop for Android devices
    cmdline-tools component is missing
    Run `path/to/sdkmanager --install "cmdline-tools;latest"`
    See https://developer.android.com/studio/command-line for more 
    details.
Chrome - develop for the web
Linux toolchain - develop for Linux desktop
    clang++ is required for Linux development.
    It is likely available from your distribution (e.g.: apt 
    install clang), or can be downloaded from 
    https://releases.llvm.org/
CMake is required for Linux development.
    It is likely available from your distribution (e.g.: apt 
    install cmake), or can be downloaded from 
    https://cmake.org/download/
ninja is required for Linux development.
    It is likely available from your distribution (e.g.: apt 
    install ninja-build), or can be downloaded from 
    https://github.com/ninja-build/ninja/releases
pkg-config is required for Linux development.
    It is likely available from your distribution (e.g.: apt 
    install pkg-config), or can be downloaded from 
    https://www.freedesktop.org/wiki/Software/pkg-config/
Android Studio
    android-studio-dir = 
    /home/mbunderline76/.local/share/JetBrains/Toolbox/apps/IDEA- 
    U/ch-0
Unable to find bundled Java version.
IntelliJ IDEA Ultimate Edition (version 2022.3)
Connected device (2 available)
HTTP Host Availability
Doctor found issues in 3 categories.

enter image description here

any idea what is going on? by the way i'm using Intellij Idea Ultimate

Upvotes: 0

Views: 1029

Answers (1)

Ali Jawad
Ali Jawad

Reputation: 376

Fix these issues first.

Flutter command Line tools

Flutter Java Bundled Link

then again run flutter doctor to make sure these errors are gone.

then run flutter -v -d chrome run Or Pick " Chrome Web " in your Vscode or AndroidStudio.

Hope this works, Enjoy.

Upvotes: 2

Related Questions