Create .jks in Flutter

10.Create .jks in Flutter (Android)

(This important for Phone Auth, Google Sign-In )

10.1. Open Terminal / Command Prompt

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

10.2. Explanation

  • 10.2.1. keystore: The path where the .jks file will be created (~/my-release-key.jks for Unix/macOS, C:\Users\YourName\my-release-key.jks for Windows) .
  • 10.2.2. keyalg RSA: Algorithm used.
  • 10.2.3. keysize 2048: Key length.
  • 6.3.4. Give your ad unit a name (e.g., Banner_HomePage).
  • 10.2.4. validity 10000: Validity in days (~27 years).
  • 10.2.5. alias my-key-alias: Name of the key within the keystore.

10.3. Enter Required Info

  • 10.3.1. Keystore password
  • 10.3.2. Key password
  • 10.3.3. Your name, organization, city, state, and country code

10.4. Configure key.properties in Flutter Project

  • 10.4.1. Create a file: android/key.properties
storePassword=your-store-password
keyPassword=your-key-password
keyAlias=my-key-alias
storeFile=/Users/yourusername/my-release-key.jks