flutter failed upload app bundle to play store

275

First time i also faced this issue.

You can follow https://flutter.dev/docs/deployment/android to build app bundle.

You should pay attention at this stage,

/android/app/build.gradle file:

   buildTypes {
       release {
           // TODO: Add your own signing config for the release build.
           // Signing with the debug keys for now,
           // so `flutter run --release` works.
           signingConfig signingConfigs.debug
       }
   }

You have to change this code block with:

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

This all things are mentioned in mentioned link

At first i thought these code blocks are same that's why i pointed out that code block.

Share:
275
Sermed mayi
Author by

Sermed mayi

Updated on December 27, 2022

Comments

  • Sermed mayi
    Sermed mayi over 1 year

    I create mobile app by Flutter ,and as figured in flutter documentation I create key an make bundle to upload it ,but I get this error :

    you downloaded an APK or Android App Bundle that was signed in debug mode. APK file or Android App Bundle must be signed in release mode. Learn more about signing files or packages

    How can I change the build from debug to release mode

  • Sermed mayi
    Sermed mayi over 3 years
    I run flutter build apk --release but same
  • dm_tr
    dm_tr over 3 years
    Lean to read a question entirely before providing an answer
  • Sermed mayi
    Sermed mayi over 3 years
    I used this too same
  • Sermed mayi
    Sermed mayi over 3 years
    I did same but not solved ,I tried by android studio and upload succeded