Предупреждение: обработка SDK. Эта версия понимает только SDK XML версии до 3, но был обнаружен XML-файл SDK версии 4. Это может произойти, если вы используете версии Android Studio и инструменты командной строки, выпущенные в разное время.
../AppData/Local/Pub/Cache/hosted/pub.dev/carousel_slider-4.2.1/ lib/carousel_slider.dart:9:1: Ошибка: «CarouselController» импортируется как из «package:carousel_slider/carousel_controller.dart», так и из «package:carousel_slider/carousel_controller.dart». 'package:flutter/src/material/carousel.dart'.
import 'carousel_controller.dart';
^^^^^^^^^^^^^^^^^
../AppData/Local/Pub/Cache/hosted/pub.dev/carousel_slider-4.2.1/lib/carousel_slider.dart:48:15: Ошибка: «CarouselController» импортируется из обоих «package:carousel_slider/carousel_controller» .dart» и «package:flutter/src/material/carousel.dart».
: CarouselController() как CarouselControllerImpl,
^^^^^^^^^^^^^^^^^^
- Что пошло не так:
Не удалось выполнить задачу ':app:compileFlutterBuildDebug'.
build.gradle
Код: Выделить всё
buildscript {
ext.kotlin_version = '1.9.21'
repositories {
google()
mavenCentral()
}
dependencies {
// Use compatible plugin versions
classpath 'com.android.tools.build:gradle:8.1.0'
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Код: Выделить всё
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Код: Выделить всё
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
id 'com.google.gms.google-services'
}
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') ?: '1'
def flutterVersionName = localProperties.getProperty('flutter.versionName') ?: '1.0'
//apply plugin: 'com.google.gms.google-services'
android {
namespace "com.example.kiralik_kaleci" // Keep only one namespace here
compileSdkVersion 34
ndkVersion = "27.0.12077973"
buildToolsVersion "35.0.0"
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "com.example.kiralik_kaleci"
minSdkVersion 21
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:32.6.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'androidx.multidex:multidex:2.0.1'
}
Код: Выделить всё
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.1.0' apply false
id "org.jetbrains.kotlin.android" version "1.8.20" apply false
id 'com.google.gms.google-services' version '4.3.15' apply false
}
include ":app"
Подробнее здесь: https://stackoverflow.com/questions/792 ... adle-files
Мобильная версия