Я создаю флаттер-приложение для Android. Я нахожусь на этапе развертывания и, пытаясь решить какую-то проблему, сталкиваюсь с множеством проблем совместимости. Вот самое сложное, что мне нужно для создания градиента с помощью ./gradlew clean build. Чистый проход, но не сборка, и после нескольких часов безуспешных попыток вы - моя последняя надежда.
Вот полная ошибка:
* What went wrong:
Execution failed for task ':device_info:checkDebugUnitTestAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> 2 issues were found when checking AAR metadata:
1. Dependency 'androidx.window:window-java:1.0.0-beta04' requires libraries and applications that
depend on it to compile against version 31 or later of the
Android APIs.
:device_info is currently compiled against android-29.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 31, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
2. Dependency 'androidx.window:window:1.0.0-beta04' requires libraries and applications that
depend on it to compile against version 31 or later of the
Android APIs.
:device_info is currently compiled against android-29.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 31, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Вот текущий app/build.gradle (я уже пробовал версии 31 и 33 и даже установил зависимость, как вы можете видеть
Я создаю флаттер-приложение для Android. Я нахожусь на этапе развертывания и, пытаясь решить какую-то проблему, сталкиваюсь с множеством проблем совместимости. Вот самое сложное, что мне нужно для создания градиента с помощью ./gradlew clean build. Чистый проход, но не сборка, и после нескольких часов безуспешных попыток вы - моя последняя надежда. Вот полная ошибка: [code]* What went wrong: Execution failed for task ':device_info:checkDebugUnitTestAarMetadata'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > 2 issues were found when checking AAR metadata:
1. Dependency 'androidx.window:window-java:1.0.0-beta04' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.
:device_info is currently compiled against android-29.
Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
2. Dependency 'androidx.window:window:1.0.0-beta04' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.
:device_info is currently compiled against android-29.
Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). [/code] Вот текущий app/build.gradle (я уже пробовал версии 31 и 33 и даже установил зависимость, как вы можете видеть [code]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" }
def localProperties = new Properties() def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } }
defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.example.s3nsa_app" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdk = 21 targetSdk = 31 versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName }
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.debug } } }