Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

296
Visualizações
My project requires a newer version of the Kotlin Gradle plugin, but the suggested fix doesn't work

so I just upgraded flutter and quickly got this error:

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                       │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │
│ update C:\Users\myUsername\Desktop\Swiper\Swiper-main\android\build.gradle:                  │
│ ext.kotlin_version = '<latest-version>'                                                      │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

This is a known breaking change when upgrading.

I applied the suggested fix but the error doesn't go away

Here is my \android\build.gradle:

buildscript {
    ext.kotlin_version = '1.6.10' //there was nothing here before
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath 'com.google.gms:google-services:4.3.5'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}
(...)

Things I tried:

-flutter clean

-Restart VS Code

-Turn off and cold boot emulator again.

-Looking at similar threads

-Adding implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10" to my app/build.gradle

-Open /android in Android Studio and trying to Gradle Sync (Gradle sync failed: Sync failed: reason unknown (1 m 26 s 622 ms))

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

try this

 dependencies {
        classpath 'com.android.tools.build:gradle:7.0.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.10'
    
    }

and go android>gradle>wrapper>gradle-wrapper.properties file change zip file version

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
over 4 years ago · Santiago Trujillo Relatório

0

change the kotlin version in build.gradle from XXX to 1.6.10 or to newer version

build.gradle>gradle>android

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda