Exception Plugin [id: 'com.android.application', version: '8.2.1', apply: false] was not found in any of the following sources:

After I downloaded the new Android Studio version on 04/01/2024 and sync the gradle file, ?I’ve got this error log during build:

Plugin [id: 'com.android.application', version: '8.2.1', apply: false] was not found in any of the following sources:        
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.2.1', apply: false] was not found in any of the following sources:

This is my build.gradle file:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '8.2.1' apply false
    id 'com.android.library' version '8.2.1' apply false
}

There is no version 8.2.1 of the Android Gradle Plugin.
The latest is 8.2.0.
Don’t confuse the AGP version with the Gradle version, because Gradle has a version 8.2.1.

Thank you. I changed to 8.2.0 and now it works!

1 Like