CodexBloom - Programming Q&A Platform

IntelliJ IDEA: how to to Resolve Kotlin Coroutines Dependencies with Gradle 7.0

👀 Views: 36 💬 Answers: 1 📅 Created: 2025-06-01
IntelliJ Kotlin Gradle

Quick question that's been bugging me - I'm trying to debug I'm working on a personal project and I've looked through the documentation and I'm still confused about I'm currently working on a Kotlin project using Gradle 7.0, and I'm working with an scenario with resolving dependencies related to Kotlin coroutines... When I attempt to sync my project in IntelliJ IDEA 2021.3, I get the following behavior message: ``` Could not resolve all files for configuration ':app:developmentCompileClasspath'. > Could not find org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0. ``` I've already added the necessary repositories in my `build.gradle.kts` file: ```kotlin dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") } repositories { google() mavenCentral() } ``` I also tried invalidating caches and restarting IntelliJ, but that didn’t help. Additionally, I verified that my Kotlin plugin in IntelliJ is updated to the latest version (1.5.31). I noticed that the same dependencies work when I run a Gradle build from the command line, which makes me think it might be an IntelliJ-specific scenario. Are there any specific settings or configurations that I might have missed in IntelliJ that could affect dependency resolution? Also, is there a particular way to configure the Kotlin plugin in IntelliJ to better handle such cases? Any insights would be greatly appreciated! For context: I'm using Kotlin on Ubuntu. I'm working on a web app that needs to handle this. This is part of a larger web app I'm building. Thanks in advance! I'm working in a Windows 10 environment. Any ideas how to fix this? What would be the recommended way to handle this?