aliftc12
10/18/2023, 2:06 AMjava.lang.NoClassDefFoundError: Failed resolution of: Lio/ktor/client/engine/okhttp/OkHttp;
this is my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="<http://maven.apache.org/POM/4.0.0>" xsi:schemaLocation="<http://maven.apache.org/POM/4.0.0> <https://maven.apache.org/xsd/maven-4.0.0.xsd>" xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>kmm</artifactId>
<version>dev</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>io.insert-koin</groupId>
<artifactId>koin-core</artifactId>
<version>3.2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-core</artifactId>
<version>2.3.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-encoding</artifactId>
<version>2.3.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-content-negotiation</artifactId>
<version>2.3.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-serialization-kotlinx-json</artifactId>
<version>2.3.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-logging</artifactId>
<version>2.3.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-datetime</artifactId>
<version>0.4.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.vidio.kmm.annotations</groupId>
<artifactId>annotations</artifactId>
<version>dev</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.rickclephas.kmp</groupId>
<artifactId>kmp-nativecoroutines-core</artifactId>
<version>0.13.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.rickclephas.kmp</groupId>
<artifactId>kmp-nativecoroutines-annotations</artifactId>
<version>0.13.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Do you have any idea to fix the issue?Pablichjenkov
10/18/2023, 2:24 AMktor-client-android
instead of okhttp I believe.aliftc12
10/18/2023, 2:35 AM<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="<http://maven.apache.org/POM/4.0.0>" xsi:schemaLocation="<http://maven.apache.org/POM/4.0.0> <https://maven.apache.org/xsd/maven-4.0.0.xsd>" xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>kmm</artifactId>
<version>dev</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>io.insert-koin</groupId>
<artifactId>koin-core</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-core</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-encoding</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-content-negotiation</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-serialization-kotlinx-json</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>io.ktor</groupId>
<artifactId>ktor-client-logging</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-datetime</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>com.vidio.kmm.annotations</groupId>
<artifactId>annotations</artifactId>
<version>dev</version>
</dependency>
<dependency>
<groupId>com.rickclephas.kmp</groupId>
<artifactId>kmp-nativecoroutines-core</artifactId>
<version>0.13.3</version>
</dependency>
<dependency>
<groupId>com.rickclephas.kmp</groupId>
<artifactId>kmp-nativecoroutines-annotations</artifactId>
<version>0.13.3</version>
</dependency>
</dependencies>
</project>
ephemient
10/18/2023, 2:39 AMephemient
10/18/2023, 2:40 AMaliftc12
10/18/2023, 2:47 AMephemient
10/18/2023, 2:50 AMimplementation
or api
in your gradle build script and let the kotlin and gradle handle generating the pom and metadataephemient
10/18/2023, 2:51 AMephemient
10/18/2023, 2:52 AMPablichjenkov
10/18/2023, 3:00 AMaliftc12
10/18/2023, 5:03 AM