Ошибка при билде проекта после подключения YandexMap

Launching lib\main.dart on SM A525F in debug mode... e: file:///C:/Users/Maria/PetCare/android/app/build.gradle.kts:48:20: Unexpected tokens (use ';' to separate expressions on the same line) e: file:///C:/Users/Maria/PetCare/android/app/build.gradle.kts:48:5: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: public val NamedDomainObjectContainer.implementation: NamedDomainObjectProvider defined in org.gradle.kotlin.dsl

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\Maria\PetCare\android\app\build.gradle.kts' line: 48

  • What went wrong: Script compilation errors:

    Line 48: implementation 'com.yandex.android:maps.mobile:4.6.1-full' ^ Unexpected tokens (use ';' to separate expressions on the same line)

    Line 48: implementation 'com.yandex.android:maps.mobile:4.6.1-full' ^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: public val NamedDomainObjectContainer.implementation: NamedDomainObjectProvider defined in org.gradle.kotlin.dsl

2 errors

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.

BUILD FAILED in 4s Running Gradle task 'assembleDebug'... 5,2s Error: Gradle task assembleDebug failed with exit code 1

вот файл bild.gradle.kts

    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.petcare"
    compileSdk = flutter.compileSdkVersion
    ndkVersion = flutter.ndkVersion
    

    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.petcare"
        // You can update the following values to match your application needs.
        // For more information, see: https://flutter.dev/to/review-gradle-config.
        minSdk = flutter.minSdkVersion
        targetSdk = flutter.targetSdkVersion
        versionCode = flutter.versionCode
        versionName = flutter.versionName
    }

    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")
        }
    }
}

flutter {
    source = "../.."
}

dependencies {
    implementation 'com.yandex.android:maps.mobile:4.6.1-full'
}

Ответы (0 шт):