Flutter: плагин Gradle поддерживает только Kotlin плагин Gradle версии 1.3.10 и выше - PullRequest
0 голосов
/ 23 апреля 2020

Android Studio 3.6 Flatter BarCodeGenerator: https://pub.dev/packages/barcode_generator

В build.gradle:

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://maven.tokend.io" }
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

в pubspe c .yml

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  logger: ^0.8.3
  flutter_statusbarcolor: ^0.2.3
  intl: ^0.16.1
  carousel_slider: ^2.0.0
  adler32: ^1.0.0
  barcode_generator: ^0.2.7

Но когда я пытаюсь запустить проект, я получаю сообщение об ошибке:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':barcode_generator' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

* 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 2s
Exception: Gradle task assembleDebug failed with exit code 1

1 Ответ

1 голос
/ 23 апреля 2020

В build.gradle понижение версии файла gradle версия до 3.2.1 представлена ​​в зависимостях примерно так:

classpath 'com. android .tools.build: Gradle: 3.2.1'

...