Flutter: Error when trying to generate release apk

2,056 views
Skip to first unread message

Reman Bala

unread,
Apr 7, 2020, 11:48:29 AM4/7/20
to Flutter Development (flutter-dev)
Hello,

I am not being able to generate release apk using the command "flutter build apk".


I have followed the flutter docs to sign the apk. But I am facing this issue. 



$ flutter build apk
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform android-arm,android-arm64,android-x64
        Learn more on: https://developer.android.com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file not set for signing config release
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 47s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                      49.1s
Gradle task assembleRelease failed with exit code 1

Please help me solve this issue. 

Graham Dickinson

unread,
Apr 7, 2020, 12:51:11 PM4/7/20
to Flutter Development (flutter-dev)
The message is actually telling you how to resolve it. Have you tried any of the options it gives you?

Reman Bala

unread,
Apr 7, 2020, 1:17:16 PM4/7/20
to Flutter Development (flutter-dev)
Nothing has worked so far
Message has been deleted

Maurice McCabe

unread,
Apr 7, 2020, 1:32:24 PM4/7/20
to Flutter Development (flutter-dev)

Graham Dickinson

unread,
Apr 7, 2020, 2:14:26 PM4/7/20
to Flutter Development (flutter-dev)
Apologies, missed the keystore message when reading on my phone. Maurice's post should help.

Reman Bala

unread,
Apr 7, 2020, 11:15:50 PM4/7/20
to Flutter Development (flutter-dev)
I tried it. Its still the same

Muthaiah Thiagarajan

unread,
Apr 7, 2020, 11:18:35 PM4/7/20
to Reman Bala, Flutter Development (flutter-dev)
Hi

Try releasing through android studio -> build -> signed apk. It should work. Sometimes we get this and we now take builds mostly via android studio and xcode directly.

Thanks

Muthu



--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/a5c8f789-c202-4baf-8442-6a6e8c5053a9%40googlegroups.com.

Souvik Dutta

unread,
Apr 8, 2020, 12:03:04 AM4/8/20
to Reman Bala, Flutter Development (flutter-dev)
Have you tried updating the flutter SDK? 

Souvik flutter dev

--

Reman Bala

unread,
Apr 8, 2020, 1:31:25 AM4/8/20
to Flutter Development (flutter-dev)
I have followed this too. But it didn't work.


On Tuesday, April 7, 2020 at 11:17:24 PM UTC+5:45, Maurice McCabe wrote:

Reman Bala

unread,
Apr 8, 2020, 1:31:55 AM4/8/20
to Flutter Development (flutter-dev)
My SDK is of the latest version. Still not working.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.

Reman Bala

unread,
Apr 8, 2020, 1:33:27 AM4/8/20
to Flutter Development (flutter-dev)
Android studio doesnt show signed apk in build menu. 
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.

Souvik Dutta

unread,
Apr 8, 2020, 1:34:31 AM4/8/20
to Reman Bala, Flutter Development (flutter-dev)
Try building your app for just one specific platform. A fat APK means that your app is being built for lots of platforms. Try it building it once but for just a specific platform.

Souvik flutter dev

To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/79127cc5-0ad6-4817-a9e5-e113bdafa65c%40googlegroups.com.

Reman Bala

unread,
Apr 8, 2020, 1:34:48 AM4/8/20
to Flutter Development (flutter-dev)
I have followed this but it is still giving me the error.


On Tuesday, April 7, 2020 at 11:17:24 PM UTC+5:45, Maurice McCabe wrote:

Souvik Dutta

unread,
Apr 8, 2020, 7:35:59 AM4/8/20
to Reman Bala, Flutter Development (flutter-dev)
Where are you situated? I mean are you in mainland China?

Souvik flutter dev

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.

Souvik Dutta

unread,
Apr 8, 2020, 7:38:42 AM4/8/20
to Reman Bala, Flutter Development (flutter-dev)
Well I did find a lot of people to be helped by this command. 
flutter build appbundle --release
Have you tried this? Try this once and see if it works.
Reply all
Reply to author
Forward
0 new messages