Android Studio 4.2 Kotlin Plugin Issue

21

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) 

Share
Improve this question
5
  • stackoverflow.com/questions/67400029/… – Ananiya Jemberu May 5 at 13:05
  • But I want to use the latest Kotlin version – Ibrahim Disouki May 5 at 13:33
  • 2
    As it is not released as a stable version yet, Kotlin 1.5 should be used in Android Studio Canary instead of the latest stable version – Wang May 5 at 13:44
  • 1
    @Wang who said it's not stable? Where did you get this info? – user924 May 6 at 12:20
  • I'm thinking this is a bug with the new release. Any time I got this warning, updating the version made the warning go away and I was at the latest stable version. This appears to be impossible with the new version, unless there is some missing gradle setting that is preventing it from finding the bundled version. – John Glen 2 days ago

Comments

Popular posts from this blog

Meaning of `{}` for return expression

Get current scroll position of ScrollView in React Native

flutter websocket connection issue