What to do when Flutter App stuck at “Running Gradle task ‘assembleDebug’… ” in Android Studio?

This situation may happen during the first Flutter App run. It is because gradle file may not be correct and needs to be cleaned and rebuild. Simply run below command in your Android Studio Terminal at $Project\Android folder:

./gradlew clean build

Please note, in the above Android Gradle plugin requires Java 11 to run. So, if you are using other versions of Java such as Java 1.8 then it might not work.

Leave a Reply