Within my libs.version.toml (version catalog) I have application plugin defined like this:
[versions]
agp = "7.4.2"
kotlin = "2.0.10"
[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
I’m using multiple modules within my application but this plugin is defined only inside :app
module.
build.gradle (Module :app)
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.kotlinAndroid)
id('kotlin-kapt')
id('androidx.navigation.safeargs')
alias(libs.plugins.kotlin.serialization)
}
android {
compileSdk 34
....
}
I’m getting this error:
Error resolving plugin [id: 'com.android.application', version: '7.4.2', apply: false]
> The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.
check the Gradle version in gradle-wrapper.properties and check this link for Android studio version and Gradle version and Plugin version compatiblity.
There is a second way that i use it. create a new project in Android stodio and check version of Gradle and Plugin version to use in downloaded project.
I hope it is useful.
1