Flutter Build Error: Process 'command 'E:Flutter Appsflutterinflutter.bat'' 以非零退出值 1 结束
当我尝试在我的 flutter 应用程序的 android studio 中生成签名的 apk 时出现此错误 - Process 'command 'E:Flutter Appsflutterinflutter.bat'' 以非 -零退出值 1
I got this error when I try to generate a signed apk in the android studio of my flutter app - Process 'command 'E:Flutter Appsflutterinflutter.bat'' finished with non-zero exit value 1
我可以在模拟器和我的设备上运行该应用程序,但仅当我尝试构建已签名的 apk 时才会出现此错误.
I am able to run the app in both emulator and on my device but this error shows up only when I try to build a signed apk.
flutter doctor
[√] Flutter (Channel dev, v1.2.0, on Microsoft Windows [Version 10.0.17763.253], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] VS Code (version 1.30.2)
[√] Connected device (1 available)
• No issues found!
有什么办法可以解决这个问题吗?
Any way to fix this?
尝试了flutter clean
android studio Build >清理项目并重建项目
(同样的错误)
android studio Build > clean project and rebuild project
(same error)
我正在构建 > 生成签名的 apk > apk > 发布 > V1(Jar 签名)> 完成构建应用
I am doing Build > Generated signed apk > apk > release > V1(Jar signature) > Finish to build the app
我在执行此命令 flutter upgrade
并从 V 1.22 升级到 V 1.27 后遇到了同样的问题.
正是我所做的,我去了 pubspec.yaml
然后 pub-get
&pub-upgrde
我发现有很多过时的包然后我尝试了 pub-outdated
但 AS 升级失败,它建议我运行此命令 flutter pub upgrade --major-versions
并且我看到它已成功下载并安装了过时的软件包,然后我执行了 Invalided Caches &重新启动AS,因为我发现它在C分区上缓存了大约5GB,最后我再次正常运行该应用程序,没有任何问题.
I had the same problem after this command flutter upgrade
and upgrading from V 1.22 to V 1.27.
Exactly what I did, I went to pubspec.yaml
then pub-get
& pub-upgrde
I found there's many outdated packages then I tried pub-outdated
and the AS failed to upgrade it, the it's suggests to me to run this command flutter pub upgrade --major-versions
and I saw that it's successfully downloaded and installed outdated packages, Then I do Invalided Caches & restarted AS because I found it's cached about 5GB on C partition, and finally I run the app normally again without any problems.