Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Build Error: Process 'command 'E:\Flutter Apps\flutter\bin\flutter.bat'' finished with non-zero exit value 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 Apps\flutter\bin\flutter.bat'' finished with non-zero exit value 1

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?

Tried flutter clean

android studio Build > clean project and rebuild project(same error)

I am doing Build > Generated signed apk > apk > release > V1(Jar signature) > Finish to build the app

like image 629
dheeraj reddy Avatar asked Feb 06 '19 11:02

dheeraj reddy


2 Answers

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.

like image 149
Dr Mido Avatar answered Oct 07 '22 22:10

Dr Mido


  • check if you have any assets is not founded by pubspec.yaml maybe for typo you will get Waring for that after packages get

  • check AndroidX compatibilities in this Flutter app for help show this

like image 18
Mahmoud Abu Alheja Avatar answered Oct 07 '22 20:10

Mahmoud Abu Alheja