Looking for ?

Translate

Best Solved - Flutter App stuck at Running Gradle task assembleDebug

Hello Guys, how are you all? Hope you all are fine. You might face Flutter App stuck at “Running Gradle task ‘assembleDebug’… ” this error in a flutter comes with all possible solutions.



we are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

DO YOU NEED A WEBBSITE OF APP FOR YOUR BUSINESS,

CALL OR WHATSAPP WAKABIA ICT +2347063076212

Flutter App stuck at “Running Gradle task ‘assembleDebug’… ” Cause ?

i. You Might Face This Problem When you run the app the first time.


ii. It never initialize Gradle nor the dependencies. 


iii. Sometimes, in the background flutter is downloading gradles files and this was going to take hours. That's why the app can be stuck.

 

Solution 1


1. Open your flutter Project directory.

2. Change directory to android directory in your flutter project directory cd android

3. clean gradle ./gradlew clean

4. Build gradle ./gradlew build or you can combine both commands with just ./gradlew clean build (Thanks @daniel for the tip)

5. Now run your flutter project. If you use vscode, press F5. First time gradle running assembleDebug will take time.

This Solution Worked For Me.


Solution 2

 Try to see flutter  Log run -v showed to see maybe it is downloading  https://services.gradle.org/distributions/gradle-5.6.2-all.zip. This Process Can take Hours. To solve this error you have to follow the below steps.


1. Interrupt gradle build

2. Download the required gradle zip from a fast mirror: https://distfiles.macports.org/gradle/gradle-5.6.2-all.zip

3. Copy gradle-5.6.2-all.zip to C:\Users\ <MyUsername>\.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb (of course the last folder will have a different name on your PC)

4. flutter run.

5. that’s it.


SHARE THIS POST

About Wakabia

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment