I updated Android studio 4.2 but I wasn't able to create new project kotlin
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
All you need to do is to open the <your project>/android/build. gradle file then update ext. kotlin_version to a newer version: At the time of writing, the latest version is 1.6.
Go to Intellij Preferences -> Build, Execution, Deployment -> Kotlin Compiler. Update Language version and Api version to the one you wish. This should be the accepted answer.
Kotlin 1.6 was released in November 2021. Kotlin 1.7 was released in June 2022, including the alpha version of the new Kotlin K2 compiler.
As we know Kotlin plugin is bundled with Android Studio above version 3.0, we can build android application using Kotlin language instead of Java. Below are the steps to create a new project in Kotlin programming Language. Step 1: In Welcome to Android Studio screen, select Start a new Android Studio Project.
Edited kotlin has released stable version of version 1.5.0 last night you can use this version to stay up-to-date Show activity on this post. Show activity on this post. You should know that there are "two" build.gradle files in the Gradle Scripts on Android Studio, the build.gradle (Project) and build.gradle (Module).
Android Studio doesn’t start after installing version 4.2 Studio tries to import previous.vmoptions and sanitize them to work with the garbage collector used by JDK 11. If that process fails, the IDE may not start for certain users who set custom VM options in the.vmoptions file.
Note: This issue ( #135172147) is fixed in Android Studio 3.6 Canary 6 and higher. If you have Android Studio set to receive updates on the Canary or Dev channel, you can get the latest version by choosing Help > Check for Updates (Android Studio > Check for Updates on macOS). Otherwise, you can download it from the Android Studio preview page.
The error is clear Gradle was unable to find the library that you declared
Possible fixes
Location
Project -> build.gradle
//update it dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30" }
Edited kotlin has released stable version of version 1.5.0 last night you can use this version to stay up-to-date
dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0" }
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