Introduction to Flutter:

Flutter is Google’s UI toolkit for building beautiful applications for mobile, web, and desktop from a single codebase. It’s easy to learn and increasingly popular. In this tutorial, you’ll learn the basics of Flutter and how to create a simple application.

Tools & Setup:

Prerequisites:

  • Flutter & Dart SDK
  • Any IDE: Android Studio (Recommended), Visual Studio Code, or IntelliJ IDEA

Step-by-Step Guide:

  1. Download Flutter SDK:

  2. Update Your Path:

    • On Windows, search for ‘env’ in the Start search bar and select ‘Edit environment variables for your account’.
    • Under ‘User variables’, find the ‘Path’ entry. If it exists, append ;C:\src\flutter\bin to it. If not, create a new variable named ‘Path’ with the value C:\src\flutter\bin.
    • Note: You must close and reopen any existing console windows for these changes to take effect.
  3. Install Android Studio:

    • Download Android Studio.
    • Install the Flutter and Dart plugins: Open Android Studio, go to ‘File’ > ‘Settings’ > ‘Plugins’, search for ‘Flutter’, and click ‘Install’.
  4. Run Flutter Doctor:

    • Open a console window and run flutter doctor to check if there are any dependencies you need to install.
    • Follow any additional instructions provided by flutter doctor to complete your setup.
  5. Create Your First Flutter App:

    • In your console, navigate to your desired directory and run flutter create my_app to create a new Flutter project.
    • Navigate into your project directory (cd my_app), and run flutter run to launch your app on an emulator or connected device.

Fresh instalation you can find as above two remaining issues to address:

Here is the solution

  1. Android SDK Not Found:
    • Since you have Android Studio installed, the Android SDK should be installed as well. Open Android Studio and go to “Tools” > “SDK Manager” to check the Android SDK Location.
    • Once you have the path to the Android SDK, run the following command in your console to update Flutter’s configuration:arduinoCopy codeflutter config --android-sdk "path_to_your_android_sdk"
    • Replace "path_to_your_android_sdk" with the actual path to your Android SDK.
  2. Visual Studio Not Installed (Optional):
    • This is necessary only if you plan to develop Windows apps with Flutter. If you do, download Visual Studio from here and install it with the “Desktop development with C++” workload.
    • If you’re not planning to develop for Windows, you can ignore this issue.

After addressing the Android SDK issue, run flutter doctor again to confirm that all issues have been resolved. If you need further assistance, feel free to ask.

Step with Img -1

Android Command-Line Tools Missing:

  • You need to install the command-line tools for the Android SDK. Open Android Studio and go to “Tools” > “SDK Manager.”
  • In the SDK Manager, go to the “SDK Tools” tab and make sure the “Android SDK Command-line Tools” option is checked. If it’s not, check it and click “Apply” to install.

Android License Status Unknown:

  • You need to accept the Android SDK licenses. Open a command prompt or terminal and run the following command:cssCopy codeflutter doctor --android-licenses
  • Follow the prompts to accept the licenses.
  1. Visual Studio Installation Incomplete:
    • It seems that your Visual Studio installation is incomplete. Open the Visual Studio Installer from the Start menu.
    • In the installer, you should see an option to modify or repair your Visual Studio installation. Choose to repair or complete the installation as needed.
    • Make sure the “Desktop development with C++” workload is selected during this process.

After addressing these issues, run flutter doctor again to confirm that all issues have been resolved.

The steps to install Visual Studio for Windows development with Flutter:

Related Post

Leave a Comment