Hey everyone, after creating a new multiplatform module in an existing android application from the wizard using Cocoapods dependency, the project gives an error on Gradle Sync saying "Val cannot be reassigned" for version of cocoapods. I went to the CocoapodsExtension.kt file where version is defined as a var of String type and not as val. Does anyone know how to resolve this issue? Thanks.
h
Hossein Amini
03/30/2023, 5:06 AM
I have the same issue, could you fix it?
p
Priyanshu Jain
03/30/2023, 12:56 PM
Yes. Bring version out of the cocoapods closure. This happens with kotlin v1.6.0 and below. I tested on Kotlin v1.7.20 and this issue does not exist on that.
h
Hossein Amini
03/30/2023, 1:47 PM
Thank you by moving the version out of the cocopods closure the issue fixed but the kotlin version is 1.8
Actually the issue appeard when I added sqldelight classpath to the project gradle, do you know why it happend?
p
Priyanshu Jain
03/30/2023, 2:15 PM
Haven't had the chance to use sqldelight in any project so can't help you with this sorry 😕.