Paramclasses Academy - Blog

Tutorials Details

←
Post 11 of 40
→

How to Run a Flutter App on an Android Emulator and Real Device | Param Classes

How to Run a Flutter App on an Android Emulator and Real Device | Param Classes

November 2, 2026

How to Run a Flutter App on an Android Emulator and Real Device

❖ Welcome to Param Classes!

Welcome to Param Classes! In our previous tutorials, we learned how to create a Flutter project in Android Studio and understood the important folders and files used in Flutter development.

Now it's time to learn an important practical step: how to run a Flutter application on an Android emulator and a real Android mobile phone.

When developing a mobile application, you need to test how it looks and works on a device. Flutter allows you to run the same project on an Android emulator or a physical Android phone.

In this tutorial, we will learn both methods step by step. We will also understand how to check connected devices, run Flutter commands and fix common errors.

✦ 1. What Is an Android Emulator?

An Android emulator is software that creates a virtual Android device on your computer.

It allows developers to test Android applications without connecting a physical mobile phone.

For example, you can create a virtual Pixel device and run your Flutter application inside it.

Benefits of an Android emulator:

  • Test applications without a physical phone.

  • Try different Android device sizes.

  • Test different Android versions.

  • Debug applications during development.

  • Check layouts and screen behavior.

Android Studio provides Device Manager to create and manage virtual Android devices.

✦ 2. Requirements Before Running a Flutter App

Before running your Flutter application, make sure you have:

  1. Flutter SDK installed.

  2. Android Studio installed.

  3. Flutter and Dart plugins enabled.

  4. Android SDK installed.

  5. An Android emulator or physical Android device.

  6. A Flutter project ready to run.

First, open your project in Android Studio.

You can check your Flutter installation by opening the terminal and running:

flutter doctor

This command checks your Flutter development environment and reports missing components or configuration problems.

Read the output carefully and resolve any important issues related to Android development.

✦ 3. Create an Android Emulator in Android Studio

Let's create a virtual Android device.

Step 1: Open Android Studio

Open Android Studio and load your Flutter project.

Step 2: Open Device Manager

Go to:

Tools → Device Manager

In some Android Studio versions, Device Manager may also be available from the toolbar.

Step 3: Create a Virtual Device

Click the option to create a virtual device.

Step 4: Select a Device Model

You will see a list of available device profiles.

For example:

  • Pixel

  • Pixel Pro

  • Other available Android device profiles

Select a device model and click Next.

Step 5: Select an Android System Image

Choose an available Android system image.

If the image is not installed, download it first.

Choose a compatible image for your development environment.

Step 6: Finish Emulator Setup

Click Next and then Finish.

Your virtual device will now appear in Device Manager.

✦ 4. Start the Android Emulator

After creating the virtual device, you need to start it.

Follow these steps:

  1. Open Device Manager.

  2. Find the virtual device you created.

  3. Click the Start or Play icon.

  4. Wait for the Android emulator to boot.

  5. Unlock the virtual device if required.

Once the emulator is running, Android Studio should be able to detect it as an available device.

You can now run your Flutter application on it.

✦ 5. Run Your Flutter App from Android Studio

Now let's run our first Flutter application.

Step 1: Open your Flutter project in Android Studio.

Step 2: Make sure your Android emulator is running.

Step 3: Find the device selector in the Android Studio toolbar.

Step 4: Select your running Android emulator.

Step 5: Open the lib/main.dart file.

Step 6: Click the Run button.

Android Studio will start the build process.

Flutter will compile the application and install it on the selected emulator.

After the build completes, your application will open on the virtual Android device.

✦ 6. Create a Simple Flutter Application for Testing

If you don't have an application ready, use this simple example.

Open lib/main.dart and replace the existing code with:

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: 'Flutter Test App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('My First Flutter App'),
          backgroundColor: Colors.blue,
          foregroundColor: Colors.white,
        ),
        body: const Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Icon(
                Icons.phone_android,
                size: 80,
                color: Colors.blue,
              ),
              SizedBox(height: 20),
              Text(
                'Flutter App Running Successfully!',
                textAlign: TextAlign.center,
                style: TextStyle(
                  fontSize: 22,
                  fontWeight: FontWeight.bold,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

What does this code do?

  • main() starts the Flutter application.

  • runApp() loads the MyApp widget.

  • MaterialApp provides the application structure.

  • Scaffold creates the screen layout.

  • AppBar displays the top toolbar.

  • Center places content in the middle.

  • Column arranges widgets vertically.

  • Icon displays an Android phone icon.

  • Text displays a success message.

Run this application on your emulator. You should see a blue app bar, a phone icon and a welcome message.

✦ 7. Run Flutter App on a Real Android Mobile

You can also test your Flutter application on a physical Android phone.

For this method, you need a USB cable and a phone that supports Android Developer Options.

❖ Step 1: Open Mobile Settings

Open Settings on your Android phone.

Find the About Phone section. Its location may vary depending on your phone manufacturer.

❖ Step 2: Enable Developer Options

Find the Build Number option.

Tap it several times, usually seven times, until your phone displays a message that Developer Options have been enabled.

You may need to enter your phone's PIN or password.

❖ Step 3: Enable USB Debugging

Open Developer Options in your phone settings.

Find and enable:

USB Debugging

This allows your computer to communicate with your Android device through Android Debug Bridge (ADB).

❖ Step 4: Connect Your Phone to Computer

Connect your Android phone to your computer using a USB cable.

If your phone asks for permission to allow USB debugging, approve the request.

Use a data-capable USB cable rather than a charging-only cable.

❖ Step 5: Select Your Mobile in Android Studio

Open your Flutter project in Android Studio.

Look at the device selector in the toolbar.

Your connected Android phone should appear in the available devices list.

Select your phone.

❖ Step 6: Run Your Application

Click the Run button.

Android Studio will build your Flutter application and install it on your phone.

After installation, the application should open automatically.

You can now test your application on a real Android device.

✦ 8. Run Flutter App Using Terminal Commands

You don't always need Android Studio's Run button. Flutter also provides terminal commands.

Open the terminal inside your Flutter project directory.

Step 1: Check Flutter Setup

flutter doctor

Step 2: Check Connected Devices

flutter devices

This command displays the devices detected by Flutter.

Step 3: Get Project Dependencies

flutter pub get

Step 4: Run Your Application

flutter run

If multiple devices are connected, you can select a particular device using its device ID:

flutter run -d DEVICE_ID

Replace DEVICE_ID with the actual ID shown by the flutter devices command.

Step 5: Stop the Application

When running Flutter from the terminal, press:

q

This quits the running Flutter session.

✦ 9. Understand Hot Reload While Testing

One useful Flutter feature is Hot Reload.

Hot Reload allows developers to apply many code changes to a running application without restarting it completely.

For example, change:

Text('Hello Flutter')

to:

Text('Welcome to Param Classes')

Save the file while your Flutter application is running.

Flutter can update the screen using Hot Reload.

Hot Reload is useful for quickly checking UI changes during development. Some changes require a full restart instead.

We will explore Hot Reload and Hot Restart in more detail in the next tutorials.

✦ 10. Common Errors and Their Solutions

Beginners may face some problems while running Flutter applications.

❖ Problem 1: No Devices Found

Possible reason: No emulator is running, or the connected phone is not detected.

Solution:

  • Start your Android emulator.

  • Check your USB cable.

  • Enable USB Debugging.

  • Approve the debugging permission on your phone.

  • Run flutter devices again.

❖ Problem 2: Android License Not Accepted

Possible reason: Required Android SDK licenses have not been accepted.

Solution:

Run:

flutter doctor --android-licenses

Read the license terms and accept them where appropriate.

❖ Problem 3: Emulator Is Not Starting

Possible reason: Your computer may not have sufficient resources, or the emulator configuration may have a problem.

Solution:

  • Close unnecessary applications.

  • Check available system memory.

  • Review emulator settings.

  • Try another compatible virtual device profile.

❖ Problem 4: USB Device Not Detected

Possible reason: USB debugging is disabled, the cable does not support data transfer, or the required device driver is missing.

Solution:

  • Enable USB Debugging.

  • Use another data-capable USB cable.

  • Change the USB connection mode if necessary.

  • Install the appropriate USB driver if your device requires one.

  • Reconnect and approve the debugging prompt.

❖ Problem 5: Gradle Build Failed

Possible reason: There may be a dependency, SDK, Gradle configuration or network issue.

Solution:

Read the error in the Build output first. Check the Android SDK configuration and required dependencies before changing build files.

✦ 11. Practice Tasks for Beginners

Now practise these steps yourself.

  1. Create a new Flutter project named test_app.

  2. Create an Android emulator using Device Manager.

  3. Run your Flutter application on the emulator.

  4. Change the welcome message in main.dart.

  5. Run the application again.

  6. Connect your real Android phone using USB.

  7. Enable USB Debugging.

  8. Run the same Flutter application on your mobile.

  9. Use flutter devices to check connected devices.

  10. Run your application using flutter run.

❖ Conclusion

In this tutorial, we learned how to run a Flutter application using an Android emulator and a real Android mobile phone.

We also covered creating virtual devices, enabling USB Debugging, running applications through Android Studio and using Flutter terminal commands.

Testing your application on both an emulator and a real device helps you understand how your app behaves in different environments.

At Param Classes, we encourage beginners to practise every step instead of only reading code. Create your own Flutter project, connect your phone and start experimenting with your application.

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

←
Post 11 of 40
→