1. Create a keystore
keytool -genkey -v -keystore d:/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
Can be replaced by their bold path
After generating success, d disk will appear key.jks this file, on behalf of success.
2. Create key.properties
In the flutter created key.properties android project
key.properties file contents
storePassword = xxx - Create a password for the keystore
keyPassword = xxx - Create a password for the keystore
keyAlias=key
= StoreFile D: /key.jks --key.jks path
3. Modify android> app> build.gradle file
In the new line above buildTypes
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes> release is amended as
signingConfig signingConfigs.release
4. Construction Android APK
Run command flutter build apk
If successful, packaged apk package, will flutter project build> app> outputs> apk> release> in the directory, package called app-release.apk
So far. Release complete
Author: big money target
link: https: //www.jianshu.com/p/7a40eb3512e8
Source: Jane books
are copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.