Help to upgrade Android Gradle Plugin (AGP)

plugins {
    id "com.android.application"
    // START: FlutterFire Configuration
    id 'com.google.gms.google-services'
    // END: FlutterFire Configuration
    id "kotlin-android"
    // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
    id "dev.flutter.flutter-gradle-plugin"
}

android {
    namespace = "com.example.app_peliculas_firebase"
    compileSdk = flutter.compileSdkVersion
    ndkVersion = flutter.ndkVersion

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId = "com.example.app_peliculas_firebase"
        // You can update the following values to match your application needs.
        // For more information, see: https://flutter.dev/to/review-gradle-config.
        minSdk 23 //flutter.minSdkVersion
        targetSdk = flutter.targetSdkVersion
        versionCode = flutter.versionCode
        versionName = flutter.versionName
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig = signingConfigs.debug
        }
    }
}

flutter {
    source = "../.."
}
My project is in flutter with VS CODE and I want to upgrade AGP.
This is the content of my file: android/app/build.gradle
Where should I change?

// Agregar configuraciĂłn de compilaciĂłn
// tasks.withType(JavaCompile) {
//     options.compilerArgs << "-Xlint:unchecked"
//     options.compilerArgs << "-Xlint:deprecation"
// }

You need to give us more context here.

What plugins are you using?
What do you see in the debug console?
What are your app not doing?

PS. Please use the formatting tools
image
Help us to to read you post, to help you.

follow this

1 Like

you should go to android/settings.gradle file and under plugins block change the version for com.android.application like this:

plugins {
id “dev.flutter.flutter-plugin-loader” version “1.0.0”
id “com.android.application” version “8.7.3” apply false
id “org.jetbrains.kotlin.android” version “1.9.23” apply false
}