Flutter App stuck at "Running Gradle task 'assembleDebug'... " - Stack Overflow

PHOTO EMBED

Sat Aug 05 2023 14:08:49 GMT+0000 (Coordinated Universal Time)

Saved by @oday

Launching lib\main.dart on Lenovo A319 in debug mode...
Running Gradle task 'assembleDebug'...
(This is taking an unexpectedly long time.)


Here is solution in my case.

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. First time gradle running assembleDebug will take time.
PS: Delete gradle in case of all that steps don't work
content_copyCOPY

https://stackoverflow.com/questions/59516408/flutter-app-stuck-at-running-gradle-task-assembledebug