Flutter Issue | Keystore file not set for signing config release

Step 1:

Step 2:

Step 3:

gradle signing configuration
By making changes to the [project]/android/app/build. gradle file, you can instruct Gradle to use your upload key when creating your app in release mode.

Before the Android block, include the keystore information from your properties file:

content_copy

def keystoreProperties = new Properties()
   def keystorePropertiesFile = rootProject.file('key.properties')
   if (keystorePropertiesFile.exists()) {
       keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
   }

   android {

Step 5:

By making changes to the [project]/android/app/build. gradle file, you can instruct Gradle to use your upload key when creating your app in release mode.
and substitute the following signature configuration data there:

  signingConfigs {
       release {
           keyAlias keystoreProperties['keyAlias']
           keyPassword keystoreProperties['keyPassword']
           storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
           storePassword keystoreProperties['storePassword']
       }
   }
   buildTypes {
       release {
           signingConfig signingConfigs.release
       }
   }

Step 6:

Create a key.properties file into the keystoreProperties object

Reference the keystore from the app

Create a file named [project]/android/key.properties that contains a reference to your keystore:

storePassword=
keyPassword=
keyAlias=upload
storeFile=/upload-keystore.jks>

Build an APK

Despite the fact that app bundles are preferred to APKs, certain shops do not yet support them. Create a release APK for each target ABI (Application Binary Interface) in this situation.

The APK will be signed if the signing procedures were followed. You may want to obfuscate your Dart code at this point to make it more challenging to reverse engineer. It includes adding a few flags to your build process to obfuscate your code.

by using the command line:

Run flutter build apk --split-per-abi
(The flutter build command defaults to --release.)
This command results in three APK files:

[project]/build/app/outputs/apk/release/app-armeabi-v7a-release.apk
[project]/build/app/outputs/apk/release/app-arm64-v8a-release.apk
[project]/build/app/outputs/apk/release/app-x86_64-release.apk

When the –split-per-abi flag is not used, your code is compiled for all of the target ABIs and is included in a big APK. These APKs are larger than their split equivalents, which forces the user to download native binaries that are incompatible with the architecture of their device.

Resources

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x