Windows Setup

  1. Environment Setup for Windows
  2. Install Git
  3. Install the Flutter SDK
  4. Install Android Studio
    1. Personal computer
    2. Lab computer
  5. (Optional) Android Phone Setup
  6. Android Emulator Setup
  7. Installing Visual Studio Code
  8. Testing your setup

Environment Setup for Windows

These instructions are for Windows 10/11 only. These instructions are distilled and customized from https://docs.flutter.dev/get-started/install.

Please do not hesitate to ask the instructor for help. There are a lot of steps, and they can be confusing. Reach out on Slack or by email.

Install Git

Lab computer: Git is already installed on UNCW lab machines.

Personal computer: Install the Git program if you do not already have it installed.

Install the Flutter SDK

  1. Download the flutter_windows_3.16.5-stable.zip.
  2. Unzip the file in the current location, which will automatically create a flutter/ directory. (Note: verify that you didn’t accidentally create subdirectory structure like flutter/flutter/[MANY FILES])
  3. Move this flutter/ directory to your %HOME% folder identified in Lab: Environment Setup, e.g., c:\users\laymanl\
    • Note: If your %HOME% folder has spaces in it, create a folder called c:\dev and use it as your %HOME% folder.
  4. Update your path:
    1. From the Start search bar, enter ‘env’ and select Edit environment variables for your account
    2. In the top ‘User variables’ section, do you have a variable named Path?
      1. If Yes, select the Path variable and click Edit. Then click Browse, then navigate to and select %HOME%/flutter/bin.
      2. If No, click New click New and type Path as the variable name with exact capitalization. Then click the Browse Directory button and select the %HOME%/flutter/bin folder.
    3. Now, open a terminal or console window and type flutter doctor. You should see a bunch of Flutter output. If you see “Command not found” or something similar, contact the instructor for help.

Install Android Studio

If you work on Windows, you have to use Android even if you own an iPhone. You can only develop for iPhone if you have a Mac.

Personal computer

  1. Go to https://developer.android.com/studio and click the “Download Android Studio” button. Accept the license and download the file.
  2. Run the file and accept the default settings.
  3. The ‘Android Studio Setup Wizard’ will pop-up. Select “Standard Installation” and all default options. This will install a variety of tools needed to compile Android programs. You will need to accept some Android licenses. This installation will take a very long time.

Lab computer

  1. Go to https://developer.android.com/studio#android-studio-downloads.
  2. Scroll way down to select the file android-studio-2023.1.1.17-windows.zip (no .exe installer) next to Windows (64-bit). Accept the license and download the file. Windows Android studio correct link
  3. Unzip the file into the current directory, which should create a folder named android-studio.
  4. Move android-studio folder to your %HOME% folder so that you have %HOME%\android-studio\.
  5. Browse to the file %HOME%\android-studio\bin\studio64.exe. Drag this file to your windows task bar, or right-click it and “Create a Desktop Shortcut”.
  6. Run Android Studio (studio64.exe)
  7. A Wizard will pop-up saying you need to install an SDK. Click through the installer with the default options.

(Optional) Android Phone Setup

If you have an Android phone you would like to use, follow https://docs.flutter.dev/get-started/install/windows/mobile?tab=physical#configure-your-target-android-device

Android Emulator Setup

You can set up an Android emulator, which is a simulated phone that runs in Android Studio that you can interact and test with. This is very handy, so you should at least try it.

Follow all of the instructions in the “Configure your target Android device” section of https://docs.flutter.dev/get-started/install/windows/mobile?tab=virtual#configure-your-target-android-device

Installing Visual Studio Code

We will use Visual Studio Code to write our Flutter apps. We could use Android Studio, but it requires a lot of RAM as do other essential tools like the emulator/simulator. So, we’ll use VS Code for the benefit of those with limited RAM.

Follow the instructions here: https://docs.flutter.dev/get-started/editor?tab=vscode.

Testing your setup

  1. Create a folder in your %HOME% directory called flutter_projects
  2. Follow the instructions for Test Drive: https://docs.flutter.dev/get-started/test-drive?tab=vscode with the following modifications:
    • When asked to Select a folder to create the project in, select the flutter_projects folder you created.
    • For a quick and dirty test, you can use a Web Browser as the target device.
    • If you’re developing for iOS, you’ll need to launch an iOS simulator as in the instruction page.
    • If you’re developing for Android, you should see the options to pick an Android Emulator device to run on.
  3. Running/Debug will begin the process of compiling and running the Flutter project. This process will take a long time the first time you do it, but should be faster after that. You should see some output appear in the “Debug Console”. The Debug Console will likely show a lot of things being downloaded – this is okay, and also why it’s taking so long. Be patient.