Gleb Nazarov
09/21/2024, 11:58 AMe: file:///C:/Users/Gleb/repos/ktor/ktor-io/common/src/io/ktor/utils/io/ByteWriteChannelOperations.kt:129:23 Unresolved reference 'CoroutineContext'.
e: file:///C:/Users/Gleb/repos/ktor/ktor-io/common/src/io/ktor/utils/io/ByteWriteChannelOperations.kt:129:42 Unresolved reference 'EmptyCoroutineContext'.
e: file:///C:/Users/Gleb/repos/ktor/ktor-io/common/src/io/ktor/utils/io/ByteWriteChannelOperations.kt:136:23 Unresolved reference 'CoroutineContext'.
e: file:///C:/Users/Gleb/repos/ktor/ktor-io/common/src/io/ktor/utils/io/ByteWriteChannelOperations.kt:136:42 Unresolved reference 'EmptyCoroutineContext'.
e: file:///C:/Users/Gleb/repos/ktor/ktor-io/common/src/io/ktor/utils/io/ByteWriteChannelOperations.kt:140:15 Cannot access class 'kotlin.coroutines.CoroutineContext'. Check your module classpath for missing or conflicting dependencies.
e: file:///C:/Users/Gleb/repos/ktor/ktor-io/common/src/io/ktor/utils/io/ByteWriteChannelOperations.kt:141:31 Cannot access class 'kotlin.coroutines.CoroutineContext'. Check your module classpath for missing or conflicting dependencies.
...
This happens for fresh cloned project, clean gradle cache (I removed everything in ~/.gradle/caches), when I try to build with --no-build-cache
option
for some reason I though that some of the dependencies could not be downloaded, and there are results for .\gradlew.bat dependencies
command:
jvmTestRuntimeClasspath - Runtime classpath of 'jvm/test'.
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1
| \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1
....
| \--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1 (*)
+--- org.slf4j:slf4j-api:2.0.16
+--- org.jetbrains.kotlin:kotlin-test:2.0.20 FAILED
Some modules could not resolve org.jetbrains.kotlin:kotlin-test:2.0.20
dependency
Did anyone stumble upon this error? How can I fix this?Gleb Nazarov
09/21/2024, 11:58 AMA problem occurred configuring root project 'ktor'.
> =============================== Gradle Doctor Prescriptions ============================================
| JAVA_HOME is not set. |
| Please set JAVA_HOME so that switching between Android Studio and the terminal does not trigger a fu |
| ll rebuild. |
| To set JAVA_HOME: (using bash) |
| echo "export JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.bash_profile |
| or `~/.zshrc` if using zsh. |
| |
========================================================================================================
Even though I can verify that I've set the JAVA_HOME environment, I can't see it in Gradle JVM options in Build Tools
Would appreciate any help for building it either on windows or wsl 🙂RJ Garcia
09/21/2024, 12:38 PMRJ Garcia
09/21/2024, 12:40 PMGleb Nazarov
09/21/2024, 12:41 PMRJ Garcia
09/21/2024, 12:42 PMGleb Nazarov
09/21/2024, 12:43 PMRJ Garcia
09/21/2024, 12:43 PMGleb Nazarov
09/21/2024, 12:43 PMGleb Nazarov
09/21/2024, 12:45 PMGleb Nazarov
09/21/2024, 12:46 PMRJ Garcia
09/21/2024, 1:02 PMAleksei Tirman [JB]
09/23/2024, 8:58 AMAleksei Tirman [JB]
09/23/2024, 8:59 AMGleb Nazarov
09/23/2024, 10:29 AM.\gradlew.bat assemble
Windows 11, JDK 17 Amazon Coretto, also tried JDK 17 by JetBrainsAleksei Tirman [JB]
09/23/2024, 11:11 AMassemble
task completes successfully on my machine. Have you tried deleting the Maven cache?Gleb Nazarov
09/24/2024, 5:45 AM