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

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

提交回复
热议问题