Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create new Kotlin project after updating to Android Studio 4.2

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 
like image 569
TEN_KUNG Avatar asked May 05 '21 11:05

TEN_KUNG


People also ask

How do you fix your project requires a newer version of the Kotlin gradle plugin?

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.

How do I change my version of Kotlin?

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.

What is the latest version of Kotlin?

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.

How to build Android application using Kotlin instead of Java?

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.

What is the latest version of Kotlin Gradle?

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).

Why doesn’t Android Studio start after installing Android Studio?

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.

How do I get the latest version of Android Studio?

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.


1 Answers

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" } 
like image 118
Ananiya Jemberu Avatar answered Sep 21 '22 18:09

Ananiya Jemberu