Missing Import Errors in Kotlin
Kotlin's Unresolved reference error is the equivalent of Java's cannot find symbol. It means the compiler can't find the class, function, or property you're referencing.
Auto-Imported Standard Library
Kotlin auto-imports kotlin.*, kotlin.collections.*, etc. But extension functions from other packages need explicit imports:
// Error: Unresolved reference: joinToString
// This IS auto-imported, but if you see this error,
// check you're calling it on the right type
// Extension functions from kotlinx need explicit import
import kotlinx.coroutines.launch
import kotlinx.coroutines.delayGradle Dependencies
// build.gradle.kts
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("io.ktor:ktor-server-core:2.3.7")
}Kotlin/Java Interop
Java classes are imported normally, but Kotlin companion objects need special handling:
import java.time.LocalDateTime
import java.util.UUID
// Kotlin companion object from Java:
// MyClass.Companion.create() in Java
// MyClass.create() in Kotlin (automatic)Extension Functions From Other Modules
// These look like methods but are actually imported functions
import com.example.utils.toSlug // Extension on String
val slug = "My Title".toSlug()Typealias Confusion
// If a typealias is in another file, it needs importing
// In types.kt:
typealias UserId = String
// In another file:
import com.example.types.UserIdBugsly captures ClassNotFoundException in Kotlin JVM apps and Unresolved reference build errors via CI integration.
Try Bugsly Free
Track up to 100 issues per month on the free plan; events are not billed.
Get Started FreeRelated Articles
Fix Template Error in TypeScript
Step-by-step guide to fix Template Error in TypeScript. Includes root cause analysis, code examples, debugging tips, and prevention strategies.
Read moreFix Template Error in Rails
Step-by-step guide to fix Template Error in Rails. Includes root cause analysis, code examples, debugging tips, and prevention strategies.
Read moreHow to Fix Proxy Error in .NET
Learn how to diagnose and fix the proxy error in .NET. Includes code examples and prevention tips.
Read moreHow to Fix Rangeerror in NestJS
Learn how to diagnose and fix the rangeerror in NestJS. Includes code examples and prevention tips.
Read moreFrom the same team
SEOBolt
Technical SEO and AI search audits with ready-to-apply fix plans.
Try SEOBolt →GrowFast
Domain in, qualified B2B leads out, with cold outreach and deliverability handled.
Try GrowFast →AutoShort
Turn a topic into a faceless short: AI script, voiceover and captions.
Try AutoShort →RemixViral
Paste a long video and get back the moments worth posting, cut vertical and captioned.
Try RemixViral →