Flutter App stuck at “Running Gradle task 'assembleDebug'… ”

后端 未结 30 3417
你的背包
你的背包 2020-12-08 18:28

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         


        
相关标签:
30条回答
  • 2020-12-08 19:00

    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.

    0 讨论(0)
  • 2020-12-08 19:01

    I used the command "flutter clean" in my project and it returned to work perfectly, please try. Igual a imagem

    flutter clean
    
    0 讨论(0)
  • 2020-12-08 19:01

    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

    0 讨论(0)
  • 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

    1. Ensure you have installed android sdk tools and added them to the environment path. I assume you have downloaded android sdk tools.

    2. Ensure you have installed gradle and added it to the path

    3. 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

    0 讨论(0)
  • 2020-12-08 19:04

    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.

    0 讨论(0)
  • 2020-12-08 19:04

    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.

    0 讨论(0)
提交回复
热议问题