question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unresolved reference: serializer on specific file

See original GitHub issue

Describe the bug This is a very weird bug that happened to me. Took me hours to figure it out. Basically, I’m getting an Unresolved reference: serializer error when trying to use it. The IDE is fine, there’s no error. I can use the file but every time I compile, it’s having an error. Now, all my configurations are good. I was able to use them normally until I introduced this normal data class. I restarted my IDE, doesn’t work. Restart and Invalidate, still doesn’t work. Clean, doesn’t work. Rebuild, doesn’t work, Clean, Rebuild, then restart and invalidate, still didn’t work. And then I decided to move the file away to another folder. IT WORKED. I renamed it back and it didn’t work again. I was thinking is there some sort of cache or something blocking it. If I’m missing something, please do point me in the right direction. Many thanks!

To Reproduce I’m not able to reproduce it specifically.

Expected behavior No Unresolved reference: serializer bug

Environment

  • Kotlin version: 1.3.50
  • Library version: 0.13.0
  • Kotlin platforms: Multiplatform - Common
  • Gradle version: 5.4.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sandwwraithcommented, Nov 18, 2019

Probably stopping Kotlinc/Gradle daemon (or killall java 🙃 ) may also help in overcoming incremental compilation glitches.

1reaction
pdvriezecommented, Nov 12, 2019

Try to wipe out the gradle cache in your project. It seems likely that this is a problem with incremental compilation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kotlin Serialization: "Unresolved reference - Stack Overflow
I'm trying out Kotlin Serialization. After setting it up following the directions, I get the Unresolved reference: serializer build error ...
Read more >
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 >
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
Serializing /deserializing the content in a specific format. Ktor supports the following formats out-of-the-box: JSON, XML, CBOR, ...
Read more >
Getting Started with Kotlinx Serialization - Eric the Coder
If you're getting an unresolved reference on toMediaType toMediaType, just know that's from the okHttp library which you need to import into ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found