Game Development
Building for Android
Learn APK/AAB builds for Android and the keystore.
Android build: APK and AAB
There are two primary output formats for Android: APK (Android Package) which can be installed directly onto devices, and AAB (Android App Bundle) which is required for Google Play Store submissions.
// In the Build Settings window, enable
// 'Build App Bundle (Google Play)' to generate an AAB.
The AAB format enables Google Play to dynamically deliver optimized binaries tailored to the user's device architecture.
Keystore and Package Name
Before submitting to Google Play, a Keystore holding your digital signature must be generated. If this keystore is lost, pushing future updates to the game becomes impossible.
// Package name format (Player Settings > Identification):
// com.CompanyName.GameName
The Package Name is defined using a globally unique reverse domain name structure.
Exercise Generate Android package identifier
Combine domain, company, and product into the packageId variable. Then print "Paket: com.games.runner | Format: AAB" using Console.WriteLine.
Show example solution
using System;
class AndroidPackageInfo
{
static void Main()
{
string domain = "com";
string company = "games";
string product = "runner";
string packageId = $"{domain}.{company}.{product}";
Console.WriteLine($"Paket: {packageId} | Format: AAB");
}
}
Test yourself
-
Which modern packaging format is required when publishing a new game on Google Play Store?
- OBB (Expansion File)
- IPA (iOS App Package)
- APK (Android Package)
- AAB (Android App Bundle)
Show answer
AAB (Android App Bundle) — Google Play Store enforces the AAB format for new apps and updates to ensure size optimization.
-
Verify Android platform
if (Application.platform == RuntimePlatform.____) {
Console.WriteLine("Android cihaz");
}
Show answer
if (Application.platform == RuntimePlatform.Android) {
Console.WriteLine("Android cihaz");
}
-
Android build components
- APK
- Directly installable Android package
- AAB
- Optimized package for Google Play
- Keystore
- Key store verifying app signature
- Package Name
- Unique reverse-domain app identity
Next lesson: Building for iOS