I’m trying to build an existing kotlin project. But I’m facing this error.
Build file 'D:Dataworknotes-androidbuild.gradle.kts' line: 2
Plugin [id: 'com.android.application', version: '8.1.1', apply: false] was not found in any of the following sources:
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.1.0', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:8.2.0')
Searched in the following repositories:
Google
MavenRepo
Gradle Central Plugin Repository
Here is my settings.gradle.kts
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven(java.net.URI.create("https://jitpack.io"))
}
}
rootProject.name = "Notes"
include(":app")
And here is my build.gradle.kts
plugins {
id("com.android.application") version "8.1.1" apply false
id("org.jetbrains.kotlin.android") version "1.8.0" apply false
id ("com.google.dagger.hilt.android") version "2.44" apply false
id ("com.android.library") version "8.1.1" apply false
id ("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "2.0.1" apply false
}
I’m using android-studio-2023.1.1.28-windows.
I’ve seen similar problems to me here and tried those solutions to fix this issue. I changed the version 8.1.1 to 8.1.0 and 8.2.0. But nothing resolved the issue. Pls help me. Thank you.
New contributor
Aleksandar Djorik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.