why am I unable to resolve `JsonFeature` even if I...
# ktor
s
why am I unable to resolve
JsonFeature
even if I have
ktor-client-json
as a dependency? It was working at some point and now I cannot get it to work, even if I create a new project using the ktor intellij creator. Maven is just completely unable to resolve the
.json.
package.
i’m also unable to resolve CIO even if I have
Copy code
<dependency>
      <groupId>io.ktor</groupId>
      <artifactId>ktor-client-cio</artifactId>
      <version>${ktor_version}</version>
    </dependency>
as a dependency. This makes no sense.
also have
Copy code
<dependency>
      <groupId>io.ktor</groupId>
      <artifactId>ktor-client-serialization</artifactId>
      <version>${ktor_version}</version>
    </dependency>
as a dependency, which should pull in
ktor-client-json
, and it is showing up fine as a dependency, but for some reason my code is completely unable to resolve the types. This is with a project generated straight from the generator.
I had to explicity add the
-jvm
to the end for some reason. In the past I’ve not had to do this. I’m not sure why now I need to.
a
There are some problems with Gradle cache that anyone experiences from time to time.
s
@Aleksei Tirman [JB] so should I be able to resolve these dependencies without using
-jvm
? Because I had wiped my gradle cache (that’s initially what I thought the problem was), and it didn’t resolve the issue.
a
Did you remove ~/.m2 and ~/.gradle directories?
s
no, I had deleted the cache directory in the
~/.gradle
directory