moko-resources
moko-resources copied to clipboard
Compilation error on iOS with K2
The generated classes do not compile on iOS with the K2 compiler due to a change related to expected/actual objects.
Generated MR.kt:
public expect object MR {
public object strings : ResourceContainer<StringResource>
public object plurals : ResourceContainer<PluralsResource>
public object images : ResourceContainer<ImageResource>
public object fonts : ResourceContainer<FontResource>
public object files : ResourceContainer<FileResource>
public object colors : ResourceContainer<ColorResource>
public object assets : ResourceContainer<AssetResource>
}
Issue:
Object MR.strings is not abstract and does not implement abstract member nsBundle
Relevant Kotlin issue: https://youtrack.jetbrains.com/issue/KT-59739
Hi @Alex009 Whenv0.25.0could be available to public use?
@sureshmaidaragi1919 i think you tell about 0.24.0. this version already available public as alpha version. in 0.24.0 version will be provided support of K2 too. now it in tests and fixes by @ExNDY , please watch on new releases
@Alex009 Yes I am using the 0.24.0-alpha-5 Still I am seeing below issue, Is it not support Kotlin 2.0.0-Beta ? https://kotlinlang.slack.com/archives/CMC5LN42W/p1710063864560009
I have recently updated the KMM jetpack compose to v1.6.0-rc03 and multiplatform 2.0.0-Beta4 and tried running iOS building started seeing this issue for Strings, image, font error: Object 'MR.images' is not abstract and does not implement abstract member 'nsBundle'. error: Object 'MR.strings' is not abstract and does not implement abstract member 'nsBundle'. error: Object 'MR.colors' is not abstract and does not implement abstract member 'nsBundle'. error: Object 'MR.fonts' is not abstract and does not implement abstract member 'nsBundle'.
On current time, support of K2 in progress. Main problem is changed expect/acutal in Kotlin 2.0
Any timeline to get moko resources supports for Kotlin2.0?
Main problem is changed expect/acutal in Kotlin 2.0
will be fixed in 0.24.0-alpha6
fixed in 0.24.0-beta-1