Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 4.2 - Kotlin version 1.5.0 error and endless loading for suggestions in Project Structure window

And what does it mean?

enter image description here

enter image description here

I tried to change ext.kotlin_version = '1.5.0' to ext.kotlin_version = '1.5.0-release-764' but in this case gradle project fails to build with Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.

UPDATE ext.kotlin_version = '1.5.0' - also doesn't work, same error and warning

build.gradle:

buildscript {
    ext.kotlin_version = '1.5.0'

    repositories {
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
    }
}

gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip

Could not resolve all artifacts for configuration ':classpath'. Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0/kotlin-gradle-plugin-1.5.0.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.

UPDATE 2

I had to add mavenCentral() to make it work, though warning is still there but it builds

Also another issue if 4.2 version is endless loading for suggestions in Project Structure window after you updated version of one dependency

enter image description here

like image 905
user924 Avatar asked May 06 '21 09:05

user924


2 Answers

They released new version 202-1.5.10-release-894-AS8194.7

Now it works fine without any warning with: ext.kotlin_version = '1.5.10'

Though I didn't check the second issue

endless loading for suggestions in Project Structure window

like image 153
user924 Avatar answered Oct 16 '22 15:10

user924


I had this problem recently with version 1.5.10-release-894. So I change to 1.5.10 and now it builds !

buildscript {
    ext.kotlin_version = "1.5.10"
    repositories {
        google()
        mavenCentral()
    }

Also I updated the build.gradle to version 4.2.1

    dependencies {
        classpath "com.android.tools.build:gradle:4.2.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
like image 36
Lucas Avatar answered Oct 16 '22 15:10

Lucas