[英]Flutter stuck at “Running Gradle task 'bundleRelease'…” when I tried to create an apk
I'm fairly new to android studio and flutter.我对 android 工作室和 flutter 相当陌生。 Recently I released a simple app and I used the command
flutter build apk
.最近我发布了一个简单的应用程序,我使用了命令
flutter build apk
。 An apk was built fairly quickly but the size was a bit more than I expected.一个 apk 的构建速度相当快,但大小比我预期的要大一些。 Then someone advised me to run the command
flutter build appbundle --target-platform android-arm,android-arm64
and so I did that with my next app.然后有人建议我运行命令
flutter build appbundle --target-platform android-arm,android-arm64
,所以我在下一个应用程序中这样做了。 However, terminal is now stuck at Running Gradle task 'bundleRelease'...
.但是,终端现在卡在
Running Gradle task 'bundleRelease'...
。 There's no cpu usage so I'm sure the app is not being built in the background.没有 cpu 使用,所以我确定应用程序不是在后台构建的。
Firstly, run flutter clean
首先,运行
flutter clean
then flutter upgrade
( optional )然后
flutter upgrade
(可选)
*if you want to release your app in Playstore, then run *如果您想在 Playstore 中发布您的应用,请运行
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
otherwise flutter build apk
will also work否则
flutter build apk
也将起作用
This will help you这将帮助你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.