Minimum Android and iOS Versions Required for the Google AI Edge Gallery App

The Google AI Edge Gallery app requires Android 12 (API 31) or higher and iOS 17 or higher, due to dependencies on modern ML runtime APIs, Jetpack Compose, and SwiftUI 4 frameworks.

The Google AI Edge Gallery app demonstrates on-device machine learning capabilities using the latest mobile frameworks. To ensure consistent performance and access to critical APIs, the project enforces strict minimum operating system requirements that align with modern Android and iOS feature sets.

Android Minimum Version Requirements (API 31)

The Android implementation mandates Android 12 (API 31) as the absolute minimum.

Build Configuration in build.gradle.kts

In Android/src/app/build.gradle.kts, the minSdk property is explicitly set to 31:

android {
    defaultConfig {
        minSdk = 31
        // Additional configuration...
    }
}

This configuration prevents installation on devices running Android 11 or earlier.

AndroidManifest.xml Declaration

The manifest file at Android/src/app/src/main/AndroidManifest.xml reinforces this requirement with the following declaration:

<uses-sdk android:minSdkVersion="31" />

Runtime Version Checks

The source code frequently verifies the runtime version before accessing API 31+ features. The following pattern appears throughout the Android implementation:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
    // Safe to use Android 12+ APIs such as Jetpack Compose,
    // NNAPI extensions, and updated permission handling.
    startGalleryApp()
} else {
    // Show a friendly message directing the user to upgrade.
    showUnsupportedVersionDialog()
}

iOS Minimum Version Requirements (iOS 17)

While the iOS source code resides in a separate repository, the README.md explicitly documents that the app requires iOS 17 and up.

Documentation in README.md

The requirements are stated clearly in the project documentation at line 55 of README.md, specifying iOS 17 as the minimum supported version for Apple devices.

Swift Availability Checks

The iOS implementation guards platform-specific calls using Swift's availability APIs to prevent runtime crashes on older OS releases:

@available(iOS 17, *)
func launchGalleryApp() {
    // Use SwiftUI 4 features and Core ML v4 APIs.
    ContentView()
        .ignoresSafeArea()
        .environmentObject(ModelManager.shared)
}

Technical Justification for Minimum Versions

Jetpack Compose and Modern UI (Android)

Android 12 introduces the stable API surface required for Jetpack Compose 1.5+, which powers the app's entire user interface. Earlier SDKs lack essential composables and performance optimizations necessary for the Gallery's ML visualization features.

LiteRT and NNAPI Extensions (Android)

The LiteRT on-device ML runtime leverages NNAPI extensions introduced in Android 12, enabling efficient model inference through hardware acceleration. The app depends on these extensions to avoid falling back to slower, older runtimes.

Permissions and Security Models (Android)

Android 12 introduces scoped storage and updated foreground-service notification rules that the app relies on for background model downloads and secure credential handling.

SwiftUI 4 and Core ML Improvements (iOS)

iOS 17 provides SwiftUI 4 and enhanced Core ML APIs, including improved MLModelConfiguration options for neural engine execution. The OS also offers updated privacy controls required for on-device inference and VisionPro-compatible frameworks.

Summary

  • The Google AI Edge Gallery app requires Android 12 (API 31) minimum, defined in Android/src/app/build.gradle.kts and Android/src/app/src/main/AndroidManifest.xml
  • iOS 17 is the minimum supported version for Apple devices, as documented in the README.md
  • Android 12 requirements stem from Jetpack Compose dependencies, LiteRT NNAPI extensions, and modern permission models
  • iOS 17 requirements enable SwiftUI 4 features and advanced Core ML execution paths
  • Both platforms implement runtime checks to prevent execution on unsupported OS versions

Frequently Asked Questions

Android 12 provides the minimum API level required for Jetpack Compose 1.5+ stability and LiteRT's NNAPI extensions. The minSdk = 31 setting in Android/src/app/build.gradle.kts ensures access to modern ML acceleration and scoped storage security features unavailable in Android 11.

No. The app requires iOS 17 to support SwiftUI 4 frameworks and Core ML v4 APIs. Attempting to run the app on iOS 16 would trigger the @available(iOS 17, *) guards, preventing initialization of critical view components.

Where are the minimum SDK versions defined in the source code?

For Android, the minimum SDK is defined as minSdk = 31 in Android/src/app/build.gradle.kts (line 37) and declared as android:minSdkVersion="31" in Android/src/app/src/main/AndroidManifest.xml (line 22). For iOS, the requirement is documented in README.md (line 55).

What happens if I try to run the app on an unsupported OS version?

On Android, the system prevents installation entirely due to the manifest declaration. If sideloaded or checked at runtime, the code executes showUnsupportedVersionDialog() when Build.VERSION.SDK_INT < Build.VERSION_CODES.S. On iOS, the Swift compiler enforces @available(iOS 17, *) constraints, preventing the app from launching on older versions.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →