https://kotlinlang.org logo
#ktor
Title
# ktor
r

rudolf.hladik

08/12/2020, 11:15 AM
Hi, what dependency should I specify to be able to use Ktor client on ios in common module with kotlin 1.4-rc? i’ve tried
implementation("io.ktor:ktor-client-core:1.3.2-1.4.0-rc")
but it was not enough, it wants engine so i’ve tried
implementation("io.ktor:ktor-client-cio:1.3.2-1.4.0-rc")
but it doesn’t work 😞
👀 2
Copy code
Execution failed for task ':shared:compileKotlinIos'.
> Could not resolve all files for configuration ':shared:iosCompileKlibraries'.
   > Could not resolve io.ktor:ktor-client-cio:1.3.2-1.4.0-rc.
     Required by:
         project :shared
      > Unable to find a matching variant of io.ktor:ktor-client-cio:1.3.2-1.4.0-rc:
          - Variant 'jvm-api' capability io.ktor:ktor-client-cio:1.3.2-1.4.0-rc:
              - Incompatible attribute:
                  - Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'jvm'.
              - Other attributes:
                  - Found org.gradle.libraryelements 'jar' but wasn't required.
                  - Found org.gradle.status 'release' but wasn't required.
                  - Required org.gradle.usage 'kotlin-api' and found compatible value 'java-api'.
                  - Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.
          - Variant 'jvm-runtime' capability io.ktor:ktor-client-cio:1.3.2-1.4.0-rc:
              - Incompatible attribute:
                  - Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'jvm'.
              - Other attributes:
                  - Found org.gradle.libraryelements 'jar' but wasn't required.
                  - Found org.gradle.status 'release' but wasn't required.
                  - Required org.gradle.usage 'kotlin-api' and found compatible value 'java-runtime'.
                  - Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.
          - Variant 'metadata-api' capability io.ktor:ktor-client-cio:1.3.2-1.4.0-rc:
              - Incompatible attributes:
                  - Required org.gradle.usage 'kotlin-api' and found incompatible value 'kotlin-metadata'.
                  - Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'common'.
              - Other attributes:
                  - Found org.gradle.status 'release' but wasn't required.
                  - Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.
          - Variant 'metadata-commonMainMetadataElements' capability io.ktor:ktor-client-cio:1.3.2-1.4.0-rc:
              - Incompatible attribute:
                  - Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'common'.
              - Other attributes:
                  - Found org.gradle.status 'release' but wasn't required.
                  - Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
                  - Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
j

jean

08/14/2020, 6:05 AM
Did you figure out what was wrong?
r

rudolf.hladik

08/14/2020, 6:05 AM
not yet
4 Views