Wiktor Nizio
Wiktor Nizio

Reputation: 76

Ktor: Can't import dependencies

I have created the sample Ktor project in IntelliJ IDEA.

I added the following dependencies to build.gradle.kts:

implementation("org.ktorm:ktorm-core:3.4.1")
implementation("io.reactivex.rxjava3:rxkotlin:3.0.0")

It looks like the dependencies are found, as the project builds and runs.

I am trying to add imports to the source code:

import org.ktorm.database.*
import io.reactivex.Completable

The IDE doesn't see packages org.ktorm nor io.reactivex.

What can I do to use Ktorm or RxJava in Ktor? It looks like it doesn't see any dependencies I add.

Upvotes: 0

Views: 900

Answers (1)

Wiktor Nizio
Wiktor Nizio

Reputation: 76

I have figured it out. After adding a dependency select File->Invalidate caches, and then click the button "Invalidate and restart".

Upvotes: 4

Related Questions