Not able to generate swift sdk using kotlin mulitplatform with Android studio 4.0.1

56 Views Asked by At

I got this error after upgrading android studio to 4.0.1. It was working with android version 3.4.

ext.kotlin_version = '1.3.41'

I am using kotlin native multiplatform. I try to generate the sdk using terminal with below command

./gradlew :sdk:build 

I get below error.

Unresolved reference: KtorExperimentalAPI

It is not able to identify platform api.

io.ktor.client.HttpClient -> Unresolved reference:
1

There are 1 best solutions below

0
Rajesh Maurya On

I found the solution. As I have updated my android studio from 3.4.1 to 4.0.1. So I changed distribution url to 6.1.x and gradle version to 4.0.1.

I reverted back to distribution url to 5.4.1 (https://services.gradle.org/distributions/gradle-5.4.1-all.zip) and changed the kotlin version class path to 3.5.3.