IntelliJ Idea: Unresolved reference: serializer
See original GitHub issueIdea doesn’t compile project files with an error: “Kotlin: Unresolved reference: serializer”. I tried various cleanup task and IDE restarting and a project reimport but it doesn’t solve the issue.
Meantime gradle itself works perfectly without any errors.
build.gradle.kts
buildscript {
repositories { jcenter() }
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0")
classpath("org.jetbrains.kotlin:kotlin-serialization:1.3.0")
}
}
apply {
plugin("kotlin")
plugin("kotlinx-serialization")
...
}
dependencies {
compile(kotlin("stdlib", "1.3.0"))
compile("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.9.0")
...
}
Idea version
IntelliJ IDEA 2018.2.5 (Ultimate Edition)
Build #IU-182.4892.20, built on October 16, 2018
JRE: 1.8.0_152-release-1248-b19 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14
Idea kotlin plugin version:
1.3.0-release-IJ2018.2-1
Issue Analytics
- State:
- Created 5 years ago
- Comments:36 (9 by maintainers)
Top Results From Across the Web
Unresolved reference serializer() in Kotlin - YouTrack - JetBrains
IDEA marks serializer() as unresolved reference, because of receiver type mismatch, but the code compiles and works fine. Gradle file: apply plugin: 'kotlin- ......
Read more >Kotlin Serialization: "Unresolved reference - Stack Overflow
I think the Kotlin plugin itself is activating because of id("org.jetbrains.kotlin.jvm").version("1.3.20") , not because of "kotlin" .
Read more >JS IR compiler not compatible with kotlinx.serialization?
Unresolved reference: KSerializer etc… A comment on this bug says serialization 1.0.0-RC is compatible with the Kotlin/JS IR compiler.
Read more >Content negotiation and serialization | Ktor
The ContentNegotiation plugin serves two primary purposes: Negotiating media types between the client and server. For this, it uses the ...
Read more >Getting Started with Kotlinx Serialization - Eric the Coder
A couple weeks ago, I benchmarked Gson, Jackson, and Moshi against ... classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This problem is back:
IntelliJ IDEA 2019.1.3 (Ultimate Edition) Build #IU-191.7479.19, built on May 28, 2019 JRE: 1.8.0_202-release-1483-b58 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0
serializer() function shows unresolved…
I see this intermittently day after day, not all the time, really weird. Gradle build is all ok. Looks like it’s the IDE.
To me it doesn’t fix it by restarting, I also have to delete the gradle.xml from .idea dir to fix it. Really annoying because restarting means quite a lot of reload, reindex, reimport etc… This should be reopened IMO.