Reputation: 103
Installed the latest version of Android Studio(v3.3.2) and when trying to build the project and the following error occurs.
Gradle tools version: 3.3.2
Gradle sync failed: tried to access method kotlin.collections.ArraysKt___ArraysKt.copyOfRange([Ljava/lang/Object;II)[Ljava/lang/Object; from class kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance
Tried all the possible ways already. Please help me in fixing this.
Error: Class kotlin.reflect.jvm.internal.FunctionCaller$FieldSetter
Error in Kotlin but using only Java - Class kotlin.reflect.jvm.internal.FunctionCaller$FieldSetter
https://developer.android.com/studio/releases/gradle-plugin#updating-plugin
Upvotes: 2
Views: 1862
Reputation: 113
I meet the same problem and solved by follow link:
I figured it out. It was the dependency management plugin:
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:$springBootVersion")
}
dependencies {
//...
}
In this POM, there is a kotlin.version property that needs to be overridden like this:
ext['kotlin.version'] = kotlinVersion
Where kotlinVersion is defined in my buildscript block at the top of the file.
Upvotes: 0
Reputation: 124
I faced the same issue with Android studio 3.3.2 where it didn't allow me to build with Kotlin.
Downgrading the Android studio or using the Android Studio Canary solved my issue.
I don't think its a right solution. Suggest me with a right approach.
Upvotes: 1