Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 907
Lalit sharma Avatar asked Dec 07 '25 05:12

Lalit sharma


2 Answers

Remove the

UseIR = true

option and your code should compile

like image 186
Raheem Jnr Avatar answered Dec 08 '25 18:12

Raheem Jnr


Which kotlin version you are using? It seems to be removed in 1.7. https://kotlinlang.org/docs/compatibility-guide-17.html#remove-useir-compiler-option. enter image description here

like image 31
Arst Avatar answered Dec 08 '25 17:12

Arst