Search code examples
androidfluttergoogle-playgoogle-play-console

Flutter App not installable from Google store for Android 12


I'am trying to start internal testing for my flutter App in the Google Play Console. It works for other devices except those with Android 12. On Android 12 I'm not able to install the App. But the App runs flawlessly on an Android 12 Emulator.

App not installable on Android 12

I've already followed the instructions at this question Flutter App not installable from Google store for Android 12 despite being set to targetSDK 31. Because it didn't work either, I created a new clean Flutter project and uploaded it without changing anything. The result was the same: The app was downloadable on all devices except the ones with Android 12.

My build.gradle file:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 31

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        applicationId "myAppId"
        minSdkVersion 21
        targetSdkVersion 31
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

Flutter doctor:

flutter doctor


Solution

  • It worked now in Open testing after getting the app reviewed.