Einstellen der Min -SDK -Version auf 23 oder höhere Pausen Unterstützung für 16 KB -Seitengrößengeräte
Posted: 17 Aug 2025, 12:14
Ich arbeite mit der neuesten stabilen Flutterversion und stieß kürzlich ein rätselhaftes Problem in Bezug auf die 16 -kb -Seitengrößenwarnung in der Google Play -Konsole. Ich habe fast jedes vorgeschlagene Fix versucht (NDK zu ändern, AGP anzupassen, ABI -Filter zu modifizieren usw.), aber nichts hat funktioniert. /> < /li>
Wenn ich jedoch nur die minsdkversion auf 23 oder höher ändere (ohne etwas anderes zu berühren) und das App -Bündel erneut baue, zeigt die Spielkonsole sofort die 16 -kb -Seitengröße während der Inspektion. Ich wäre wirklich dankbar, wenn jemand dies auf seinem eigenen Setup testen könnte: < /p>
Erstellen Sie ein frisches Flutter -Projekt. /> < /ol>
** < /h1>
enviroment **: < /h1>
Flutter -Arzt < /strong> < /p>
Zusätzliche Details [/b]
app/build.gradle.kts
Gradle -Wrapper
settings.gradle
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.3" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}
include(":app")
< /code>
Hat noch jemand mit diesem spezifischen Verhalten ausgesetzt? Und wenn ja, haben Sie eine zuverlässige Lösung gefunden?>
Wenn ich jedoch nur die minsdkversion auf 23 oder höher ändere (ohne etwas anderes zu berühren) und das App -Bündel erneut baue, zeigt die Spielkonsole sofort die 16 -kb -Seitengröße während der Inspektion. Ich wäre wirklich dankbar, wenn jemand dies auf seinem eigenen Setup testen könnte: < /p>
Erstellen Sie ein frisches Flutter -Projekt. /> < /ol>
** < /h1>
enviroment **: < /h1>
Flutter -Arzt < /strong> < /p>
Code: Select all
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.32.8, on Microsoft Windows [Version 10.0.19045.6159], locale en-US)
[√] Windows Version (10 Pro 64-bit, 22H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2025.1.2)
[√] Connected device (4 available)
[√] Network resources
Code: Select all
Flutter (Channel stable, 3.32.8) on Windows 10 Pro 64-bit (22H2)
Android SDK version 36.0.0
Android Studio 2025.1.2
Gradle 8.12
AGP 8.7.3
NDK 27.0.12077973
Code: Select all
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.example.just_for_test"
compileSdk = flutter.compileSdkVersion
ndkVersion = "27.0.12077973"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.just_for_test"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 23
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
// Fix for 16KB page size compatibility
ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86_64")
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
isMinifyEnabled = true
isShrinkResources = true
}
}
// Additional configuration for 16KB page size
packaging {
resources {
pickFirsts += listOf("**/libc++_shared.so", "**/libjsc.so")
}
}
}
flutter {
source = "../.."
}
Code: Select all
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.3" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}
include(":app")
< /code>
Hat noch jemand mit diesem spezifischen Verhalten ausgesetzt? Und wenn ja, haben Sie eine zuverlässige Lösung gefunden?>