How to Solve Running Gradle task assembleDebug … ” In Flutter ?

· 4 min read
How to Solve Running Gradle task 'assembleDebug'… ” In Flutter
How to Solve Running Gradle task 'assembleDebug'… ” In Flutter

Sometimes it may happen that when you run a Flutter Mobile Application Gradle start running and it keeps on running and running. So in this article, we will go through How to Solve Running Gradle task assembleDebug In Flutter.

Are you ready for the same ??

Let’s get started with the same.

How to Solve Running Gradle task assembleDebug  In Flutter?

You can try the below things

Windows Firewall was causing this problem. After I disabled it temporarily the problem was gone. Worth giving it a try. Good luck!

  • Open your flutter Project directory.
  • Change directory to android directory in your flutter project directory cd android
  • clean gradle ./gradlew clean
  • Build Gradle ./gradlew build or you can combine both commands with just ./gradlew clean build.
  • Now run your flutter project. If you use vscode, press F5. The first time Gradle running assembly debug will take time.

If you are on Windows: try adding firewall exceptions to your Android Studio follow below steps:

  • Go to:
    Control Panel\System and Security\Windows Defender Firewall\Allowed apps
  • Hit the button
    Allow another app
  • Add your new firewall exceptions:
    studio.exe and studio64.exe
  • Open in Android Studio Tools->SDK ManagerSDK Tools. Mark Android SDK Built-Tools, press Apply, wait for the update. After updated, press Apply and try to run.

    Tools
    Tools
  • You can also check below things
    C:\Users<user>\AndroidStudioProjects<flutter_app>\android> gradlew clean 
    C:\Users<user>\AndroidStudioProjects<flutter_app>\android> gradlew build

    Now run it, for initial build

    “Running Gradle task 'assembleDebug'… ”

    will take 10-12 mins after that it will be good to go.

    You can also try the below things:

  • Open a project in Android Studio
  • Right Click on Project Panel

Go down to Flutter and click on the ‘Open Android module in Android Studio‘.

Open Studio
Open Studio
  • Now, click on ‘Gradle‘ in the right panel.
  • Next, click on ‘Execute Gradle Task‘ icon
    Execute Task Gradle
    Execute Task Gradle

    This should open a ‘Run Anything‘ window.

  • If prompted by Android Studio to ‘Update Gradle Plugin‘, do that.

    Update Download
    Update Download

Conclusion:

So in this article, We have walked through How to Solve Running Gradle task assembleDebug In Flutter

Thanks for Reading!!! Keep Learning.

Do let us know if you need any assistance with Flutter Development? we would love to assist:)

FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget GuideFlutter ProjectsCode libs and etc.

FlutterAgency.com is one of the most popular online portals dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge of Flutter.

2 comments

  1. Hi there,
    This problem also occurs on Linux but I am not sure if this article is applied to this OS.

    Best regards.

    1. hey buddy 🙂

      I got your problem and you might be knowing that it cannot be answered in a single comment, I AM ON IT.

      I will make a video on the solution to your problem 🙂

      My youtube channel’s name is “Flutter agency”. By subscribing you’ll join the team and you will get notified every time a new video is uploaded(Which is every week)

      Stay Connected buddy!!

Leave a Reply