This is not a duplicate since the other question aren't related and don't solve the problem at hand like this
Anyways, is there a way to upgrade Gradle
to the latest version? I'm using Flutter
This is not a duplicate since the other question aren't related and don't solve the problem at hand like this
Anyways, is there a way to upgrade Gradle
to the latest version? I'm using Flutter
You can let Flutter determine the gradle version for the Android build. Make sure that the Flutter version that you're using is up-to-date by running flutter upgrade
. Then delete the /android
folder inside the Flutter project. Regenerate the Android build by running flutter create --platforms=android
Open the flutter project in Android studio then go to android directory inside it their is a build.gradle open it then android studio would have an option to open in android studio view, open it, android studio would download needed Gradle version, then would tell you to update to latest version.
this is my current build.gradle
buildscript {
ext.kotlin_version = '1.8.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.15'
// END: FlutterFire Configuration
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}