'...' is an inline function that is not from a current session
The “’…’ is an inline function that is not from a current session” error means the Kotlin compiler found stale inline bytecode from a prior compiler session.
What It Means
Kotlin inline functions are expanded at compile time by copying their bytecode into the call site. The compiler tracks which session produced each inline function’s bytecode. When the cached bytecode was built by a different compiler session — due to cache invalidation, incremental compilation, or daemon reuse — the compiler refuses to inline it and reports this error.
Why It Happens
- A Gradle daemon session compiled the inline function, then the daemon restarted with different compiler settings.
- Incremental compilation produced stale inline function caches.
- You switched Kotlin versions between builds (e.g., back-and-forth between 1.9.0 and 2.0.0).
- The build cache contains inline bytecode from a different project or module configuration.
- IntelliJ’s build system (not Gradle) compiled some files while Gradle compiled others.
How to Fix It
1. Clean the build entirely
# Remove all build artifacts and caches
./gradlew clean
rm -rf .gradle/buildOutputCache2. Clear the Gradle daemon cache
# Stop all running daemons
./gradlew --stop
# Clear the daemon's compiled output
rm -rf ~/.gradle/daemon
rm -rf ~/.gradle/caches/journal-*3. Rebuild from scratch
# Fresh build with no cached bytecode
./gradlew clean build --no-build-cache --rerun-tasks4. Invalidate IntelliJ caches
In IntelliJ IDEA: File → Invalidate Caches and Restart. This clears the IDE’s internal compiler cache which may have produced inline bytecode from a different session.
5. Disable incremental compilation (temporary fix)
// In build.gradle.kts
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
incremental = false
}After the build succeeds, re-enable incremental compilation for better performance.
6. Check for mixed Kotlin compiler versions
// build.gradle.kts — ensure all modules use the exact same Kotlin version
plugins {
kotlin("jvm") version "2.0.0" apply false
}
// In each module:
plugins {
kotlin("jvm")
}Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro