Dariusz Rusin
02/04/2020, 10:34 AMtargets {
final def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
? presets.iosArm64 : presets.iosX64
fromPreset(iOSTarget, 'ios') {
binaries {
framework('multiplatform-code') {
freeCompilerArgs.add("-Xobjc-generics")
}
}
}
fromPreset(presets.jvm, 'android')
}
And I'm getting this error:
Build file '/..../multiplatform-code/build.gradle' line: 40
* What went wrong:
A problem occurred evaluating root project 'multiplatform-code'.
> Operation is not supported for read-only collection
And line 40 is:
freeCompilerArgs.add("-Xobjc-generics")
I dont understand the source of the problem. What exactly "Operation is not supported for read-only collection" is mean?ribesg
02/04/2020, 10:50 AMfreeCompilerArgs
is a List
, you can’t add to a list. Try setting it to a new listribesg
02/04/2020, 10:50 AMfreeCompilerArgs = freeCompilerArgs + "-Xobjc-generics"
Dariusz Rusin
02/04/2020, 10:51 AMDariusz Rusin
02/04/2020, 10:51 AMDariusz Rusin
02/04/2020, 10:52 AMsikri
02/04/2020, 11:25 AM