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
In my case, I need to update Android SDK built-tools.
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.
I used the command "flutter clean" in my project and it returned to work perfectly, please try. Igual a imagem
flutter clean
With my LG G6 I have the same issue. It looks like the new versions of adb added some compatibility issues with some LG phones.
Downgrading to platform-tools version 28.0.0 solved the problem.
References:
https://superuser.com/questions/1357708/android-adb-logcat-works-only-on-shell/1357929#1357929
https://github.com/flutter/flutter/issues/18889#issuecomment-421432066
I am using VS Code on Ubuntu 18.04
For me it was a background download of the appropriate android sdk build tools for my connected device. Running flutter run -v
showed that it was downloading android SDK build tools which usually take some time. Once it was done, the flutter app compiled and ran successfully.
Solution
Ensure you have installed android sdk tools and added them to the environment path. I assume you have downloaded android sdk tools.
Ensure you have installed gradle and added it to the path
Ensure you have installed latest dart and flutter sdks
For no 1 and 2 please refer to this post:
Setting up flutter without Android studio
This worked for me.I got an issue with license acceptance. First you need to go through the flutter directory and then run the command
C:\Users\thrishool\flutterProjects\flutter>flutter doctor
Then it will display if everything is fine or not.I got an issue that, I didnot accept all the licenses.So you need to accept them all.Now type this in cmd
C:\Users\thrishool\flutterProjects\flutter>flutter doctor --android-licenses
Accept all the licenses and you are good to go.
In my case i only needed to wait for flutter to install gradle and other things, if you use the command
flutter run -v
you're able to see what's doing.