I have this error in my project Task 'prepareKotlinBuildScriptModel' not found in project I was looking at it online and found that adding the following lines will fix it
task prepareKotlinBuildScriptModel {
}
I tried adding the above to build.gradle.kts and following error ocured.
Function invocation 'task(...)' expected
I also tried tasks.register("prepareKotlinBuildScriptModel"){} which did not work too
what is the correct way of writing a task please.
thanks for your help in advance
thanks R
This was occurring for me when I tried to add a new subproject to my main project.
I solved the issue by unlinking the project I had added manually then 'refreshing' the parent project the sub-project was inside. See this issue:
https://github.com/gradle/gradle/issues/14889#issuecomment-988134777
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With