Android Build

One-time setup

  1. Install Android Studio (includes the Android SDK).
  2. Run flutter doctor and accept licenses if asked: flutter doctor --android-licenses.

Debug build (testing)

flutter build apk --debug
flutter install          # installs on a connected device

Release build

1. Create your signing key (once, keep it forever)

keytool -genkey -v -keystore appforge-release.keystore -alias appforge \
  -keyalg RSA -keysize 2048 -validity 10000

Store the keystore file and passwords somewhere safe — losing them means you can never update your app on Google Play again.

2. Configure signing

Copy android/key.properties.example to android/key.properties and fill in the four values (never commit or share this file):

storeFile=C:/absolute/path/to/appforge-release.keystore
storePassword=YOUR_STORE_PASSWORD
keyAlias=appforge
keyPassword=YOUR_KEY_PASSWORD

That is all — no Gradle editing is needed. android/app/build.gradle.kts already picks the file up and signs the release build with it.

If key.properties is missing, the release build falls back to the debug key so local --release runs still work, and Gradle prints a warning. Google Play rejects debug-signed uploads, so make sure the file exists before publishing.

3. Build

flutter build appbundle --release     # .aab for Google Play (recommended)
flutter build apk --release           # .apk for direct distribution

Outputs land in build/app/outputs/.

Get your release SHA-256 fingerprint:

keytool -list -v -keystore appforge-release.keystore -alias appforge

Enter it on the admin Applications page (deep-link signing identifiers), re-download the configuration package, and upload the generated website/.well-known/assetlinks.json to your website. If you use Play App Signing, take the fingerprint from Play Console → Setup → App signing instead.

Version updates

Bump Version Name / Version Code / Build Number on the Applications page, re-download, re-apply, rebuild, upload to Play — then publish the version on the Store Settings page so existing installations see the update prompt.

Notes

  • The template pins the Android Gradle Plugin to 8.9.x for plugin compatibility. Do not raise it to 9.x until the WebView plugin supports it.
  • minSdk follows Flutter's default (currently 21+); targetSdk tracks the latest stable automatically.