0

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
DroidOS
  • 8,530
  • 16
  • 99
  • 171
  • Does this answer your question? [installation app blocked by play protect](https://stackoverflow.com/questions/51080755/installation-app-blocked-by-play-protect) – Boken Apr 10 '20 at 10:58
  • Just disable play protect when you're testing your own release apk. AFAIK it's rather primitive and it will throw error while trying to install any apk that doesn't exist in the play store. – Pawel Apr 10 '20 at 11:50
  • @Pawel are you suggesting that this is only an issue because I am installing a local APK and willnot occur when the App is installed "normally" via PlayStore? – DroidOS Apr 10 '20 at 14:19
  • @DroidOS yes any app available in store is approved and whitelisted by the protect system – Pawel Apr 10 '20 at 14:39
  • So this does not happen with local installs for Debug builds but does so when Release builds are installed locally? If that is correct and you can write that up as an answer - ideally with the relevant reference for the benefit of others facing the same issue - I will accept your answer. – DroidOS Apr 10 '20 at 14:52

0 Answers0