groovy.lang.MissingPropertyException: Could not set unknown property 'useIR' for object of type org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptionsImpl

Viewed 1047

i cloned kickstarter from github & facing this error

 kotlinOptions {
    jvmTarget = JavaVersion.VERSION_11.toString()
    useIR = true
}

i have tried rebuilding , cleaning project but cant resolve this issue & there are no similar issues i found out there

A problem occurred evaluating project ':app'.

Could not set unknown property 'useIR' for object of type org.jetbrains.kotlin.gradle.dsl.KotlinJvmOption

    // Copy google-services.json from variant directory to root of app

gradle.taskGraph.beforeTask { Task task ->
    if (task.name ==~ /process.*GoogleServices/) {
        android.applicationVariants.all { variant ->
            if (task.name ==~ /(?i)process${variant.name}GoogleServices/) {
                copy {
                    from "src/${variant.name}"
                    into '.'
                    include 'google-services.json'
                }
            }
        }
    }
}

i am not sure if this might help but this error cannot reslove 'task' is in build gradle & this is the only error

2 Answers

Remove the

UseIR = true

option and your code should compile

Related