Running the debug app on a connected Android emulator is taking too long time , it take more than 10 min on visual studio

1,705

I know that I'm kinda late to the question, but I have been experiencing the same issue as well. My fix was surprisingly simple; first, delete the build and .dart_tool directories, install dependencies and run the app.

$ flutter clean 
$ flutter pub get
$ flutter run

This seems to happen whenever I use a new emulator with SDK that is not yet installed, so it's a necessary step to force the flutter command to install necessary build tools and compile the app.

Share:
1,705
Tushar Nikam
Author by

Tushar Nikam

Updated on December 16, 2022

Comments

  • Tushar Nikam
    Tushar Nikam over 1 year

    Here's the message in the terminal:

    Launching lib\main.dart on Android SDK built for x86 in debug mode...

    And:

    It's taking unusually long. Sometimes, the phone may launch the app, but only the white splash screen, and it gets stuck there. The package name (app ID) is definitely correct and consistent across the app as I created the app using this command:

    What steps can I take to fix this?

    This is the first time I'm getting the problem. Everything is fine on Flutter doctor, and Flutter is up to date

  • statHacker
    statHacker over 3 years
    I had to delete podfile.lock too.