Код: Выделить всё
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '8'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.6.0'
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 34
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation 'com.google.android.material:material:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.23"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10"
}
Какие дополнительные действия или настройки Нужно ли мне убедиться, что мое приложение Flutter ориентировано на Android 14 (уровень API 34)?
Что я пробовал:
Убедиться, что compileSdkVersion и targetSdkVersion установлено значение 34.
Запуск flutter clean и flutter pub get.
Восстановление файлов APK и AAB.
Любые указания или предложения будут с благодарностью приняты. Спасибо!
Я ожидал, что установка для compileSdkVersion и targetSdkVersion значения 34 сделает мое приложение ориентированным на Android 14 (уровень API 34). После пересборки приложения я ожидал, что консоль Google Play распознает приложение как предназначенное для Android 14. Я сделал это в своей последней версии, но все равно получаю это сообщение на консоли Google Play.
Подробнее здесь: https://stackoverflow.com/questions/788 ... ild-gradle
Мобильная версия