Generating signed APK option not available.

2,823 views
Skip to first unread message

Mahmoud Alminawi

unread,
Apr 9, 2020, 6:08:02 PM4/9/20
to Flutter Development (flutter-dev)
Hello guys,
I have been trying to generate  a signed APK. However, the option to generate a signed APK under build is not there and i saw some solutions through project structure from file, project structure option is not there as well.
Please help me!

Thank you so much guys.!!!
PS: when i run APK it works fine no errors, I need Signed APK.

ABADA SAMUEL

unread,
Apr 9, 2020, 6:21:35 PM4/9/20
to Mahmoud Alminawi, Flutter Development (flutter-dev)
Follow the procedure here:  https://flutter.dev/docs/deployment/android

--
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/714c6bd7-1f67-4b5b-bcae-9d6b2f0fc358%40googlegroups.com.

Danilo Costa Viana

unread,
Apr 9, 2020, 6:27:17 PM4/9/20
to Flutter Development (flutter-dev)
There is no such option on the Android Studio "build" menu on a Flutter project.

Instead you need to edit your android/app/build.gradle file to configure the signing settings. That way the APK or Appbundle will be automatically signed when you run flutter build apk|appbundle

To generate a keystore containing your signing certificate read this tutorial:

Then edit android/app/build.gradle adding these settings:

android {
   
// Other settings ...
    signingConfigs
{
        release
{
            keyAlias
'[YOUR ALIAS HERE]'
            keyPassword
'[PASSWORD TO YOUR KEY]'
            storeFile
'[PATH TO THE KEYSTORE YOU CREATED]'
            storePassword
'[PASSWORD TO OPEN YOUR KEYSTORE]'
       
}
   
}

   
// Some other settings.
    defaultConfig
{
       
// other configuration options
        signingConfig signingConfigs
.release
   
}
}

That way every build from now on will be signed with your certificate.

If you want to only sign release builds you can instead of adding the signConfig option to "defaultConfig" you can define the "release" build on the "buildTypes" section and add the signConfig there. That way only release builds will be 

Mahmoud Alminawi

unread,
Apr 9, 2020, 6:54:22 PM4/9/20
to Flutter Development (flutter-dev)
when i try to create a keystore, it says jeytool is not recognized.
"'keytool' is not recognized as an internal or external command,
operable program or batch file.
"
here, keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key
 for USER_NAME, do i have to change anything?

Mahmoud Alminawi

unread,
Apr 9, 2020, 6:59:10 PM4/9/20
to Flutter Development (flutter-dev)
is anyone willing to get into my computer and fix it, i will pay you for your time. i have been solving this issue since march. please!


On Thursday, April 9, 2020 at 6:08:02 PM UTC-4, Mahmoud Alminawi wrote:

Souvik Dutta

unread,
Apr 9, 2020, 11:14:29 PM4/9/20
to Mahmoud Alminawi, Flutter Development (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.

ABADA SAMUEL

unread,
Apr 9, 2020, 11:27:51 PM4/9/20
to Mahmoud Alminawi, Flutter Development (flutter-dev)
You seem to be using windows. I had a similar issue back then. If you have Java Development Kit(the one carrying JRE) installed on your system, check the directory C:\Program Files\Java\jre1.8.0_231\bin. You should see keytool.exe. If its JDK directly that you have, check the directory C:\Program Files\Java\jdk1.8.0_231\bin. You should have keytool.exe.

If you couldn't find it in any of the above, check C:\Program Files\Android\Android Studio\jre\bin, you should see keytool.exe there. 

You should add the directory where the keytool.exe is found to path in system variables so you can call the keytool command next time from anywhere on your terminal.

--
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.
Reply all
Reply to author
Forward
0 new messages