1
votes

I do everything. First do this

  1. keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key

  2. Then add key.properties file and write in there

storePassword=pasword
keyPassword= pasword
keyAlias=key
storeFile=/Users/macbook/Documents/key.jks
  1. Then add to build.gradle
    def keystoreProperties = new Properties()
    def keystorePropertiesFile = rootProject.file('key.properties')
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


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

and run flutter build apk --release. And still when I adding app-release.apk to google play give me the error 'The uploaded APK file or application package on your phone has been signed in debug mode. You must go sign in final mode. More information about signing'.

What I do wrong?

1

1 Answers

0
votes

flutter clean and next flutter build apk --release fix this issue.