Hey! I tried moko-resources, and it generated the ...
# moko
a
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
i think you got error with Android Gradle Plugin 7.3.0+ workaround here. in next release support of AGP will be fixed
a
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
looks like some invalid configuration. it's gradle report error or xcode?
a
Gradle report
I added the project to GitHub, please check https://github.com/ahmadhassan5/TestKMP
@alex009
a
hi. i will check it
a
Thanks, I'll be waiting..
a
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
543 Views