# ktor

Muhammad Talha

04/25/2022, 7:46 AM
Hi all! I’m new to Kotlin and Ktor. I just generated a Ktor project from I added the routing, content negotiation, and kotlinx.serialization plugins. When I try to build my project I’m getting a
Unresolved reference: ContentNegotiation
error in
. Does any one know how I can get past this error? Thanks in advance! I have a feeling not everything I needed got generated. I was following the tutorial and the
did not get generated either and I manually created it.
🤦‍♂️ just had to add
import io.ktor.server.plugins.contentnegotiation.*
- problem solved!


04/25/2022, 8:46 AM
Kotlin requires you to import everything you use in your file (with a few exceptions, e.g. standard library stuff). Some (most?) IDEs that support Kotlin would help you with this by providing “fixes” to import those classes for you. simple smile
👍 1