Hello. What could this error possibly mean? Is the...
# gradle
l
Hello. What could this error possibly mean? Is there any way to debug errors of this kind?
n
Execute with stack traces enabled:
-s
or
--stacktrace
Or with
--info
to print more info to the console. Maybe restarting the Gradle daemons will help (I run into file locking problems because of the daemons but this is only a guess without a stacktrace or detailed error message):
Copy code
gradle --stop
l
Unfortunately, it did not help, as well as
gradle clean
. I attach the log with stacktrace (the error message still looks cryptic and unclear).
n
It's a `NoSuchMethodError`:
Copy code
Caused by: java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.incremental.FileUtilsKt.cleanDirectoryContents(java.io.File)'
Probably you have some classpath issue :\
l
Would you please elaborate on the way I could check the classpath in this case (it looks to me like the kotlin compilation raised an exception, but I don't know how to access the classpath of kotlin compiler)?
n
Maybe try a build scan: https://scans.gradle.com/ Here are the docs for debugging dependency problems: https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html + maybe more experienced Gradle users (than me 🙂 ) will have better ideas 😉
v
It's indeed not a compile error. The error is happening in the compile tasks implementation. Looks to be like the compile task is trying to call a method that is not available in the Kotlin stdlib on the class path. My guess would be, that the Kotlin Gradle plugin your are using is not compatible with the Gradle version your are using, but that your Gradle version is too old for example.
e
1 the relevant classpath is the Gradle classpath,
./gradlew buildEnvironment
2 what gradle and kotlin versions, using kotlin daemon or not? it looks like Kotlin compiler is not compatible with the stdlib that Gradle loaded
l
./gradlew buildEnvironment
outputs
No dependencies
. My kotlin version is 1.6.20, gradlew version (according to
./gradlew version
is 7.4, I don't use kotlin daemons. Is it not compatible?
e
try
:playground:buildEnvironment
, although it could also be some plugin or buildSrc dependency causing issues
l
I attach the dependencies I got from running
:playground:buildEnvironment
. What specifically should I be looking for? And if potentially some plugin is causing it, how could I diagnose it?
e
Copy code
:dtest:gradle-plugin
is possibly the problem, as it requires a newer Kotlin than Gradle's embedded version
l
The problem was indeed where you said it is. Now I fixed it. Thank you so much for your help!