When I run the app it get stuck
Launching lib\\main.dart on Lenovo A319 in debug mode...
Running Gradle task \'assembleDebug\'...
(This is taking an unexpec
There were two reasons for me on Archlinux:
unset TERM
which was set to xterm-256color
(reference).flutter channel master
&& flutter upgrade
. I'll be able to switch back to flutter stable when the fix in master makes its way into stable (reference).This is likely one of number of issues and some of the recommended troubleshooting can be found here.
Check that you are building against an Android sdk that you have installed... in your build.gradle file check the compileSdkVersion.
You can try uninstalling and reinstalling the relevant SDK.
Some users have reported that they had to resintall Dart.
Without a little more information basic troubleshooting is the best we can offer sorry.
Good luck.
flutter run -v
showed that I was stuck on
Downloading https://services.gradle.org/distributions/gradle-5.6.2-all.zip
This was going to take hours, as for some reason the download speed was ~10kB/s on a decent DSL connection.
Solution:
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)flutter run
and voilà.This helped: check if root/android/app/build.gradle SDK version is set to minimum 28 for: compileSdkVersion 28 and targetSdkVersion 28
Occurs with import of Firestore.
If you are on Windows: try adding firewall exceptions to your Android Studio.
Control Panel\System and Security\Windows Defender Firewall\Allowed apps
Allow another app
studio.exe and studio64.exe
I hope this can be useful for you too.
If Running Gradle task assembledebug is taking unexpectedly long time, try updating Gradle in your project. (Downloading latest zip file)
You can follow steps in this answer.
Or try by:
(See screenshot for reference)
This should open the project as an Android Project.
This should open a 'Run Anything' window.
gradlew clean
gradlew build
The update would download the required .zip files. And, your apps should work fine after that.