Paramclasses Academy - Blog

Tutorials Details

←
Post 9 of 40
→

How to Create Your First Flutter Project in Android Studio | Param Classes

How to Create Your First Flutter Project in Android Studio | Param Classes

November 2, 2026

How to Create Your First Flutter Project in Android Studio

❖ Welcome to Param Classes!

Welcome to Param Classes! In the previous tutorials, we learned Dart programming, classes, objects and constructors. Now it's time to start practical Flutter app development.

In this tutorial, you will learn how to create your first Flutter project in Android Studio. We will understand the project creation process, explore the basic project structure, write a simple Flutter application and run it on an Android emulator.

If you are new to Flutter, follow each step carefully. By the end of this tutorial, you will have created and run your first Flutter application.

✦ 1. What Is a Flutter Project?

A Flutter project is a collection of files and folders required to develop a mobile, web or desktop application using Flutter.

A Flutter project contains:

  • Dart files for writing application code.

  • Assets such as images and fonts.

  • Configuration files.

  • Android and other platform-specific folders.

  • Testing files.

Flutter provides a project creation system that automatically generates the basic structure required for application development.

You don't need to create every file manually. Flutter creates the initial project structure for you.

✦ 2. Requirements Before Creating a Flutter Project

Before creating your first project, make sure the required development tools are installed.

Required software:

  1. Flutter SDK

  2. Android Studio

  3. Dart SDK (included with Flutter)

  4. Flutter and Dart plugins for Android Studio

  5. Android SDK

  6. Android Emulator or an Android mobile device

If you have not installed Flutter and Android Studio yet, first complete the setup tutorials.

Official download links:

✦ 3. Open Android Studio

First, open Android Studio on your computer.

Follow these steps:

  1. Open Android Studio.

  2. Wait for the welcome screen to appear.

  3. Find the option to create a new Flutter project.

  4. Select New Flutter Project.

If you don't see the Flutter project option, check whether the Flutter plugin is installed and enabled.

You can check plugins from:

File → Settings → Plugins

Search for Flutter and install or enable it if required. The Dart plugin may also be installed as part of the Flutter plugin setup.

Restart Android Studio if it asks you to do so.

✦ 4. Create a New Flutter Project

Now let's create our first Flutter application.

Step 1: Select New Flutter Project

From the Android Studio welcome screen, click New Flutter Project.

Step 2: Select Flutter

Choose Flutter as the project type.

Step 3: Set Flutter SDK Path

Select the location where your Flutter SDK is installed.

For example:

C:\src\flutter

Your path may be different depending on where you installed Flutter.

Step 4: Click Next

After selecting the Flutter SDK path, click Next to continue.

✦ 5. Enter Project Details

Now Android Studio will ask you to enter the project information.

For this tutorial, use the following example:

Field Example
Project Name my_first_app
Project Location D:\FlutterProjects
Description My First Flutter Application
Project Type Application

Important: Use lowercase letters and underscores for the project name. Avoid spaces and special characters.

For example:

my_first_app

You can choose a different project name for your own application.

After entering the details, click Create or Finish, depending on the Android Studio version.

Android Studio will now generate your Flutter project.

✦ 6. Wait for Project Creation

After clicking Create, Android Studio will start generating the required files and folders.

It may take some time, especially when creating your first Flutter project.

During this process:

  • Flutter creates the project structure.

  • Android Studio loads the project files.

  • Gradle may download required Android dependencies.

  • Dart and Flutter tools initialize the project.

Wait until the project finishes loading.

If Android Studio displays an indexing or Gradle synchronization message, allow it to complete.

✦ 7. Understand the main.dart File

After project creation, open the lib folder.

Inside it, you will find:

lib/
   main.dart

The main.dart file is the starting point of your Flutter application.

Open this file. You will see some sample Flutter code.

Let's replace it with a simple application.

✦ 8. Write Your First Flutter Application

Delete the existing code from main.dart and paste this complete code:

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'My First Flutter App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('My First Flutter App'),
          backgroundColor: Colors.blue,
          foregroundColor: Colors.white,
        ),
        body: const Center(
          child: Text(
            'Hello Flutter!',
            style: TextStyle(
              fontSize: 28,
              fontWeight: FontWeight.bold,
            ),
          ),
        ),
      ),
    );
  }
}

Let's understand the important parts of this code.

1. Import Flutter Material Library

import 'package:flutter/material.dart';

This imports Flutter's Material Design widgets, including Text, Scaffold, AppBar and MaterialApp.

2. Main Function

void main() {
  runApp(const MyApp());
}

The main() function is the starting point of the Dart application.

The runApp() function starts the Flutter application and displays the MyApp widget.

3. Create a Class

class MyApp extends StatelessWidget {

Here, we create a class named MyApp.

It extends StatelessWidget, which means this widget does not manage its own changing state.

4. Build Method

Widget build(BuildContext context) {

The build() method describes what the widget should display on the screen.

5. MaterialApp

return MaterialApp(
  home: Scaffold(

MaterialApp provides the basic application structure, while Scaffold provides a standard screen layout.

6. AppBar

appBar: AppBar(
  title: const Text('My First Flutter App'),
),

AppBar displays a toolbar at the top of the screen.

7. Center and Text

body: const Center(
  child: Text('Hello Flutter!'),
),

Center places its child in the middle of the available space, and Text displays the message.

✦ 9. Run Your First Flutter Application

Now it's time to run your application.

You can run your Flutter project using an Android emulator or a real Android device.

❖ Option A: Run on Android Emulator

Follow these steps:

  1. Open Android Studio.

  2. Open Device Manager.

  3. Click Create Virtual Device if you don't already have an emulator.

  4. Select a device model, such as Pixel.

  5. Choose and download a suitable Android system image.

  6. Finish the emulator setup.

  7. Start the emulator.

  8. Select the running emulator from Android Studio's device selector.

  9. Click the Run button.

Android Studio will build and launch your Flutter application.

❖ Option B: Run on a Real Android Mobile

You can also run your application on a physical Android phone.

Follow these steps:

  1. Open your mobile Settings.

  2. Find About Phone.

  3. Tap Build Number several times to enable Developer Options. The exact steps may vary by device.

  4. Open Developer Options.

  5. Enable USB Debugging.

  6. Connect your mobile to your computer using a USB cable.

  7. Approve the USB debugging permission on your phone.

  8. Select your mobile device in Android Studio.

  9. Click Run.

Your Flutter application should now open on your Android phone.

✦ 10. Run the Project Using Terminal

You can also run Flutter applications using the terminal.

Open the terminal inside your project directory and execute:

Check Flutter installation:

flutter doctor

Get project dependencies:

flutter pub get

See connected devices:

flutter devices

Run your application:

flutter run

These commands are useful when working with Flutter projects outside Android Studio.

✦ 11. Common Problems While Creating a Flutter Project

Beginners may face some common issues during project creation.

❖ Problem 1: Flutter SDK Not Found

Reason: Android Studio cannot find your Flutter SDK.

Solution: Open Android Studio settings and check the Flutter SDK path. Select the correct Flutter installation folder.

❖ Problem 2: No Device Available

Reason: No Android emulator or physical device is connected.

Solution: Start an emulator through Device Manager or connect an Android phone with USB debugging enabled.

❖ Problem 3: Gradle Build Failed

Reason: The Android build process may have a configuration, dependency or network issue.

Solution: Read the error message in the Build output, check your internet connection and verify that the required Android SDK components are installed.

❖ Problem 4: Flutter Command Not Working

Reason: Flutter's bin directory may not be added to your system PATH.

Solution: Add the Flutter SDK's bin folder to your system PATH, reopen the terminal and run:

flutter doctor

Always check the actual error message before changing project configuration.

✦ 12. Practice Task for Beginners

Now create your own simple Flutter application.

Task: Build a Welcome Screen

Your application should contain:

  • AppBar with the title "My First Project".

  • A welcome message in the center.

  • A subtitle saying "Learn Flutter Development".

  • A button with the text "Get Started".

  • A background color of your choice.

Try changing the text, font size, colors and layout.

This practice will help you understand how Flutter widgets work together.

❖ Conclusion

Congratulations! You have learned how to create your first Flutter project in Android Studio.

In this tutorial, we covered Flutter project creation, SDK configuration, project details, the main.dart file, basic Flutter widgets and running an application on an emulator or real Android device.

At Param Classes, we believe that practical learning is the best way to understand application development. Keep practising these steps and gradually move towards building complete Flutter applications.

Keep Learning with Param Classes — Learn Today, Grow Tomorrow!

←
Post 9 of 40
→