https://kotlinlang.org logo
#moko
Title
# moko
a

Ahmad Hassan

03/10/2023, 6:25 PM
Hey! I tried moko-resources, and it generated the resources but android is not being launched facing an error Unresolved string while launching the android app. and while launching iOS, this is the issue Uncaught Kotlin exception: kotlin.IllegalArgumentException: bundle with identifier shared_resources.MR not found. Can anyone assist, please? Thanks!
a

alex009

03/13/2023, 8:17 AM
i think you got error with Android Gradle Plugin 7.3.0+ workaround here. in next release support of AGP will be fixed
a

Ahmad Hassan

03/14/2023, 1:58 PM
Thanks, Android issue is resolved now. But can’t access resources in iOS side. facing this error. Task sharedlinkPodDebugFrameworkIosX64 w: Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: shared. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag. After adding scripts, faced this error: Undefined symbols for architecture x86_64: "_kfun:com.ahmadhassan.testkmp.utils#stringResource(dev.icerock.moko.resources.StringResource){}kotlin.String", referenced from: _objc2kotlin_kfun:com.ahmadhassan.testkmp.utils#stringResource(dev.icerock.moko.resources.StringResource){}kotlin.String in shared(result.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
a

alex009

03/15/2023, 7:38 AM
looks like some invalid configuration. it's gradle report error or xcode?
a

Ahmad Hassan

03/17/2023, 11:26 AM
Gradle report
I added the project to GitHub, please check https://github.com/ahmadhassan5/TestKMP
@alex009
a

alex009

03/19/2023, 10:43 AM
hi. i will check it
a

Ahmad Hassan

03/19/2023, 12:35 PM
Thanks, I'll be waiting..
a

alex009

04/21/2023, 6:56 AM
hi @Ahmad Hassan. sorry for late response. i check project - i see that you use compose 1.3.0 for this version you can't use @Composable in public api in iOS. it should be internal. on 1.4.0 this problem is resolved. also your project failed on commonMainMetadata compilation (if run
./gradlew build
- it fixed by
implementation("org.jetbrains.kotlinx:atomicfu:0.17.3")
in
commonMain
it because compose use 0.17.2 and kmm-viewmodel use 0.17.3. here pr - https://github.com/ahmadhassan5/TestKMP/pull/1
404 Views