本文介绍了Flutter App停留在"Running Gradle任务'assembleDebug'..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行该应用程序时,它会卡住
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 unexpectedly long time.)
它永远不会初始化Gradle或依赖项
It never initialize Gradle nor the dependencies
推荐答案
这是我的解决方案.
- 打开Flutter Project目录.
- 在flutter项目目录
cd android
中将目录更改为android目录 - 干净的gradle
./gradlew clean
- 构建gradle
./gradlew build
,或者您可以将两个命令与./gradlew clean build
组合使用(感谢@daniel提示) - 现在运行您的flutter项目.如果使用vscode,请按F5. gradle第一次运行assembleDebug会花费一些时间.
- Open your flutter Project directory.
- Change directory to android directory in your flutter project directory
cd android
- clean gradle
./gradlew clean
- Build gradle
./gradlew build
or you can combine both commands with just./gradlew clean build
(Thanks @daniel for the tip) - Now run your flutter project. If you use vscode, press F5. First time gradle running assembleDebug will take time.
PS:在所有步骤都不起作用的情况下删除gradle
PS: Delete gradle in case of all that steps don't work
这篇关于Flutter App停留在"Running Gradle任务'assembleDebug'..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!