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 Manager–SDK Tools. Mark Android SDK Built-Tools, press Apply, wait for the update. After updated, press Apply and try to run.
- 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‘.
- Now, click on ‘Gradle‘ in the right panel.
- Next, click on ‘Execute Gradle Task‘ icon
This should open a ‘Run Anything‘ window.
- If prompted by Android Studio to ‘Update Gradle Plugin‘, do that.
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 Guide, Flutter Projects, Code 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.