title: flutter building appbundle in release mode
body: <p>I have built an app in flutter using android studio and am trying to release it on the play store.</p>
  <p>According to <a href="https://flutter.dev/docs/deployment/android#reviewing-the-build-configuration" rel="noreferrer">https://flutter.dev/docs/deployment/android#reviewing-the-build-configuration</a>, &quot;Run <code>flutter build appbundle</code> (Running flutter build defaults to a release build.)&quot;
  <a href="https://i.stack.imgur.com/tvzwI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tvzwI.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/lvsiY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lvsiY.png" alt="enter image description here" /></a></p>
  <p>However, when I try to upload this on the play console, I get the error message that &quot;You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode.&quot;
  <a href="https://i.stack.imgur.com/AdH5Q.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AdH5Q.png" alt="enter image description here" /></a></p>
  <p>What should I do differently?</p>
  <p>From my gradle.build:</p>
  <pre><code>
  def keystoreProperties = new Properties()
  def keystorePropertiesFile = rootProject.file('key.properties')
  if (keystorePropertiesFile.exists()) {
      keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  }
  
  android {
      compileSdkVersion 29
  
      sourceSets {
          main.java.srcDirs += 'src/main/kotlin'
      }
  
      lintOptions {
          disable 'InvalidPackage'
      }
  
      defaultConfig {
          // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
          applicationId &quot;com.rtterror.custom_snooze_alarm&quot;
          minSdkVersion 16
          targetSdkVersion 29
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
      }
  
      signingConfigs {
          release {
              keyAlias keystoreProperties['keyAlias']
              keyPassword keystoreProperties['keyPassword']
              storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
              storePassword keystoreProperties['storePassword']
          }
      }
  
      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
          }
      }
  }
  </code></pre>