Cannot build a new project using Android Studio 4.2 because of the following error:
A problem occurred configuring root project 'My Application'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
When I changed the Kotlin plugin version from ext.kotlin_version = "1.5.0-release-764"
to ext.kotlin_version = "1.5.0"
app builds successfully but the following warning appears:
Kotlin version that is used for building with Gradle (1.5.0) differs from the one bundled into the IDE plugin (1.5.0-release-764)
To downgrade the plugin, you need to uninstall it, download the 1.0. 6 version corresponding to your IDE version as a file from plugins.jetbrains.com and install it using the “Install plugin from disk” button. The lack of support for downgrading plugins is a limitation of the IntelliJ Platform at this time.
Change From
buildscript {
ext.kotlin_version = "1.5.0-release-764"
......}
Change To
buildscript {
ext.kotlin_version = "1.5.0"
....}
Change the Kotlin Version Issue will be cleared.
This is a known bug:
https://youtrack.jetbrains.com/issue/KTIJ-11590
"the problem will be fixed in 1.5.10 update"
I went to the build.gradle file and changed the ext.kotlin_version = "1.5.0"
to ext.kotlin_version = "1.4.32"
, as that was the version of an older project which successfully built.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With