添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

error: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':ar_flutter_plugin' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

android/build.gradle

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
allprojects {
    repositories {
        google()
        mavenCentral()
rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
subprojects {
    project.evaluationDependsOn(':app')
task clean(type: Delete) {
    delete rootProject.buildDir

I found a solution for that here:

Why am I getting this warning and how to resolve it "This version only understands SDK XML versions up to 2 but an SDK XML..."

But then I ran into similar problem as yours.

AFAIK the main problem is the limitations in the libraries we are using, and that it isn't prepared for the level we want to.

If you use AS and look here:

under Flutter plugins, and find the module which is complaining

In my case it was "location:", and if you expand the "android" folder here you can find the contents of the gradle file:

AS you see, the level of 'ext.kotlin_version' is 1.4.20, which is too low.

Either we need to find a new provider to our libraries, try to convince the creator to release an updated version, or try to manually change it (I personally don't like to tamper with libraries that way).

Exactly what I discovered - however there is a fork of this plugin that is updated: pub.dev/packages/flutter_timezone – Ned Feb 11 at 2:43

I encountered this error using the receive_sharing_intent package. Turns out the com.android.tools.build dependency was out of date.

Pull Request

Until that gets merged you can use this dependency statement:

receive_sharing_intent:
    url: https://github.com/Thogsit/receive_sharing_intent
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.