As I get ready to release my first Flutter app on Play Store I am in the process of testing the "release" APK on one of my local devices. To that end I have done the following
On Windows I issued
keytool -genkey -v -keystore path:\to\project\keys\keystore.jks -alias AliasName -keyalg RSA - keysize 2048 -validity 10000
and then proceeded to answer all the questions that were asked. I then created the file
path://to/project/android/key.properties
with the following entries
storePassword=[store password used above]
keyPassword=[key password used above]
keyAlias=[same alias as above]
storeFile=../../keys/keystore.jks
Finally I edited path://to/project/android/app/build.gradle
as follows
signingConfigs
{
release
{
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes
{
release
{
signingConfig signingConfigs.release
}
}
With this done from the command line I ran
cls && flutter clean && flutter build apk --release --split-per-abi
and installed the resulting path://to/project/build/outputs/apk/release/app-arm64-v8a-release.apk
on my local LG Fit smartphone. On browsing to it and trying to install it I am shown the message
Blocked by Play Protect Play Protect does not recognize...
It is not clear to me why this is happening. As far as I can tell I have followed the steps correctly and the Flutter build process has not thrown up any problems.