Hey guys, are you also getting this exception when...
# appyx
l
Hey guys, are you also getting this exception when compiling for iOS from Android Studio?
Copy code
error: java.lang.IllegalStateException: no implementation for FUN MISSING_DECLARATION name:DerivedSetup visibility:public modality:FINAL <> () returnType:kotlin.Nothing
in com.bumble.appyx.navigation.node.Node
As for my configuration, I used the latest output from Compose Multiplatform Wizard, which uses Kotlin 1.9.10 and Compose 1.5.1, appyx version is 2.0.0-alpha09 @Zsolt
m
Hi @Lukas Anda. Make sure you've latest versions for everything: • Android Studio -
AS Giraffe | 2022.3.1 Patch 2
• Kotlin Multiplatform Mobile Plugin -
0.8.0(223)-25
• XCode -
15.0.1
I've also find this issue with same error you've mentioned.
l
Hi, yes I came across the same issue. It is weird that if I create a new project from scratch, it works for some reason. On the same configuration. So it must be that some dependencies don’t like it or something
z
Hey @Lukas Anda also FYI: https://github.com/bumble-tech/appyx-starter-kit if you just want something to quickly clone and start modifying (it has 2 branches, 1 for Android only, 1 for multiplatform setup).
l
Thank you, I’ll have a look
@Zsolt this is interesting, I don’t think it is an issue with kotlin version or some library, but instead something else as it only happens when I include a class that does extends ParentNode(). Would you like me to create a reproducible example?
m
Hi @Lukas Anda! It would be really helpful for us! With that, we will do our best to address the issue you're encountering.
b
@Manel Martos Roldan Hi I am having the issue that was discussed above. The repo can be found here -> https://github.com/brh/KMPRadio I am using the latest version Android Studio Beta (Hedgehog 2023.1.1) and there are no other outstanding updates. warning: 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. error: Compilation failed: no implementation for FUN MISSING_DECLARATION name:DerivedSetup visibility:public modality:FINAL <> () returnType:kotlin.Nothing in com.bumble.appyx.navigation.node.ParentNode * Source files: * Compiler version: 1.9.20 * Output kind: FRAMEWORK error: java.lang.IllegalStateException: no implementation for FUN MISSING_DECLARATION name:DerivedSetup visibility:public modality:FINAL <> () returnType:kotlin.Nothing in com.bumble.appyx.navigation.node.ParentNode at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.findImplementation(ObjCExportCodeGenerator.kt:1797) at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createDirectAdapters$getAllRequiredDirectAdapters(ObjCExportCodeGenerator.kt:1783)
I upgraded to 1.9.21 and 1.5.11 and still have the same issue.
m
Hey @Bobby Hargett. Have you created the repo using
Kotlin Multiplatform Wizard
?
I highly recommend you create new project using our
appyx-starter-kit
one, as some dependencies introduced by the wizard aren't working quite well with ours. We're actively investigating how to solve the issue. Hope it helps you.
b
No I forked the compose mpp project on GitHub. It was working when I forked the project but then when I add appyx the iOS portion to stop working.
m
Then try to fork
appyx-starter-kit
using
mutliplatform
branch
Hey there. Thanks to @Mikhail (see this thread) I've found an alternative solution anyone facing this error:
Copy code
error: java.lang.IllegalStateException: no implementation for FUN MISSING_DECLARATION name:DerivedSetup visibility:public modality:FINAL <> () returnType:kotlin.Nothing
when using
Kotlin Multiplatform Wizard
. Looks like adding
internal
to any node extending from
ParentNode
or
Node
fixes the issue. cc: @Lukas Anda @Bobby Hargett
👌 1
k
I’m also facing the same issue. However, I can’t apply the suggested workaround (with an internal modifier) because I need to expose my
Node
so that
NodeHost
can consume it
b
I tried it and it didn't seem to work anyway. I had to switch to Circuit, even though it is verbose and seems to only target Dagger for code generation.
k
That’s what I just did - I went through Circuit documentation, and as you said, it’s a bit too verbose to my taste, so I would prefer to stay with Appyx. Fortunately, I’m not in a rush so I can wait for another workaround/fix
b
@KamilH here is how I exposed my Node so android can access it, you can try something similar for iOS and see if it works for you. Let me know please, incase I did something wrong
fun establishAndroidRootNode(
_buildContext_: BuildContext,
_darkTheme_: Boolean = false
): ParentNode<MainNavTarget> { return RootNode(buildContext =
_buildContext_, false)
}
so that method is in my shared code
maybe the suggested fix still doesn’t like the node being exposed at all
🤷‍♂️ 1
k
@Bobby Hargett just for your information, tivi app is a good example of how to integrate Circuit with something other than Dagger/Hilt. The project uses #kotlin-inject
b
I got it working with Koin, but I was more looking in the code generation portion that is only for Dagger -> https://slackhq.github.io/circuit/code-gen/
@Manel Martos Roldan @Lukas Anda Where I saw Node in use I put a @OptIn(ExperimentalObjCRefinement::class) @HiddenFromObjC on it and now it works. Maybe this can be added to Appyx internal classes and it will save other devs the trouble (will probably cause other troubles though). Source -> https://github.com/JetBrains/compose-multiplatform/issues/3292
my mistake in searching before was including appx in the search
m
Hey @Bobby Hargett, thanks a lot for your alternative workaround! I'll take a look at it and evaluate the pros and cons of adding it to Appyx internal classes.
l
Nice catch, @Manel Martos Roldan please let us know how it went
m
Hey! I'm working on fixing it in library side. Meanwhile, it's safe to use annotations suggested by @Bobby Hargett
❤️ 2