Tlaster / PreCompose

Compose Multiplatform Navigation && State Management
https://tlaster.github.io/PreCompose/
MIT License
826 stars 49 forks source link

[BUG] iOS Compile failed #348

Closed briandr97 closed 1 month ago

briandr97 commented 1 month ago

Describe the bug I really want to use PreCompose for navigation. On android it works well but when I compile on xcode, compile is failed. In my main project, I get several compile errors. KLIB resolver: Could not find "molecule:molecule-runtime" in [/Users/brian/AndroidStudioProjects/Fitapat/composeApp, /Users/brian/.konan/klib, /Users/brian/.konan/kotlin-native-prebuilt-macos-aarch64-2.0.0/klib/common, /Users/brian/.konan/kotlin-native-prebuilt-macos-aarch64-2.0.0/klib/platform/ios_simulator_arm64]

Process 'command '/Library/Java/JavaVirtualMachines/{java version}/Contents/Home/bin/java'' finished with non-zero exit value 1

I changed my java version three times (11, 17, 22) But all failed. I can't find the reason (maybe I guess it is because of other dependencies).

So I make new Project to find what dependency is wrong. But iOS compile error occurred like this image. image

To Reproduce Please help me 🙏🙏 I've been suffering from this problem for several days.

Tlaster commented 1 month ago

If you're using precompose-molecule, make sure you've setup molecule dependency correctly https://github.com/cashapp/molecule

briandr97 commented 1 month ago

@Tlaster I only add api("moe.tlaster:precompose:1.6.1") not molecule, and I just got following errors 😭

image

And these are my commonMain dependencies

image image
Tlaster commented 1 month ago

Might be the same error with #342

briandr97 commented 1 month ago

Thank you for your answer!! error is fixed!!