Flutter Android gradle plugin to version 3.2.0 or higher
Asked Answered
S

1

11

I have already update the latest Android Gradle version but still showing the error when generating the signed bundle.

generating signed bundle requires you to update the android gradle plugin to version 3.2.0 or higher

enter image description here

Below i have share the version details.

buildscript {
ext.kotlin_version = '1.6.21'
repositories {
    google()
    mavenCentral()
}

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

}

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip

Android studio version

Android Studio Bumblebee | 2021.1.1 Patch 3 Build #AI-211.7628.21.2111.8309675, built on March 16, 2022 Runtime version: 11.0.11+0-b60-7772763 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.4 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 8 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: Dart (211.7817), org.jetbrains.kotlin (211-1.6.21-release-334-AS7442.40), io.flutter (66.0.1)

Flutter version

Flutter 2.10.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision 5f105a6ca7 (3 months ago) • 2022-02-01 14:15:42 -0800 Engine • revision 776efd2034 Tools • Dart 2.16.0 • DevTools 2.9.2

Sparkie answered 22/4, 2022 at 6:38 Comment(8)
change your kotlin version to ext.kotlin_version = '1.6.10' or one matches with your configurationOpportune
@OsamaBuzdar I have changed the kotlin version "1.6.21" to 1.6.10 but still getting the same error.Sparkie
Use the command line to create an app bundle docs.flutter.dev/deployment/android#build-an-app-bundleBipinnate
I have exactly the same problem. Did you find a solution? I've just opened a ticket at Jetbrains to see what they say.Sierrasiesser
Yes @Sierrasiesser , I have found the solution. you need to open android project like this from your flutter project. prnt.sc/o5BnsZ51FfZ4Sparkie
Oh my, it's so strange having to open AS for being able to create such a build... But thanks for your answer.Sierrasiesser
Is it working or not for you @valley?Sparkie
Actually yes, but i use the CLI now to create the build.Sierrasiesser
I
1

Change Your Build Gradle File Like Below

I think you are not in the latest version yet.

I Used this command to upgrade most the latest version

flutter channel dev

Now you can change your Build Gradle(Android Level)

   buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.4.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.4.0'
    }
}
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
Indignity answered 29/11, 2023 at 16:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.