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

后端 未结 30 3403
你的背包
你的背包 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 18:42

    In my case I forgot to download Google Web Driver. It’s running once I downloaded Google Web Driver.

    0 讨论(0)
  • 2020-12-08 18:43

    This problem occurred on my system because of the Zen Kernel.

    I installed the Linux-LTS kernel and started system using this.

    Then my project backed to compile again.

    0 讨论(0)
  • 2020-12-08 18:44

    Just connect with internet then disable your windows defender/firewall. It works for me.

    0 讨论(0)
  • 2020-12-08 18:45

    I stumbled on this problem when I was running my app without debugging it. Theres two option

    1. Start Debugging
    2. Run without Debugging

    I was doing the second option the whole time which got me stuck in that running graddle loop. I fixed my problem with the first option.

    0 讨论(0)
  • 2020-12-08 18:46

    How are you !,

    After many attempts, nothing they recommended worked for me.

    My problem was that I had * .dart files with many lines of code to perform SQL create and insert operations initially in SQLite, I removed those 4072 lines of operations, the file was reduced in size and I no longer had to compile a very code file long, instead, I preloaded the database into assets, and it worked flawlessly! ..

    The message that the operation is taking a long time no longer appears, I hope it serves you.

    Before, when long file size

    After, without SQL code operations

    0 讨论(0)
  • 2020-12-08 18:47

    Here is solution in my case.

    1. Open your flutter Project directory.
    2. Change directory to android directory in your flutter project directory cd android
    3. clean gradle ./gradlew clean
    4. Build gradle ./gradlew build or you can combine both commands with just ./gradlew clean build (Thanks @daniel for the tip)
    5. 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

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