Closed LinkEdgar closed 1 month ago
Hi, I am also facing the same issue
error: Compilation failed: no implementation for FUN MISSING_DECLARATION name:BeforeContent visibility:public modality:FINAL <> () returnType:kotlin.Nothing
Sample code
abstract class Widget() : NewInitializer() {
abstract fun init()
@Composable
protected abstract fun build()
@Composable
protected open fun BeforeContent() {
}
@Composable
protected open fun InitializationInProgress() {
}
@Composable
open fun Content() {
val self = this
val scope = rememberCoroutineScope()
super.scope(scope)
BeforeContent()
DisposableEffect(key1 = Unit, effect = {
super.scopedInitialization(true) { complete, waitUntil ->
self.init()
self.finished()
}
onDispose {
scope.cancel("")
}
})
RenderContent(scope)
}
@Composable
private fun RenderContent(scope: CoroutineScope) {
val initialized = super.initializationFeed().state(scope).value
if (initialized) {
this.build()
} else {
InitializationInProgress()
}
}
}
Builds fine on Android and contineous to fail on iOS. Any solution yet?
Kotlin version: 1.9.0 Compose Multiplatform: 1.5.0-rc06
Builds fine on Android and contineous to fail on iOS. Any solution yet?
Kotlin version: 1.9.0 Compose Multiplatform: 1.5.0-rc06
use internal class on tab
ex:
internal class HomeTab: Tab { }
Had a similar issue with the error message being: name:<get-icon>
instead of name:BeforeContent
.
The code is basically a copy paste from the example (see code below), which explicitly states:
Since tabs aren't usually reused, its OK to create them as object.
Changing the Tab implementation from object
to internal class
works for me, but maybe the documentation should be updated?
object HomeTab : Tab {
override val options: TabOptions
@Composable
get() {
val icon = rememberVectorPainter(Icons.Default.Home)
return remember {
TabOptions(
index = 0u,
title = "Home",
icon = icon
)
}
}
@Composable
override fun Content() {
HomeScreen().Content()
}
}
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug Task :shared:linkPodDebugFrameworkIosSimulatorArm64 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= compiler flag.
error: Compilation failed: no implementation for FUN MISSING_DECLARATION name: visibility:public modality:FINAL <> () returnType:kotlin.Nothing
in HomeTab
This happens when using the Voyager navigation library specifically the Navigation Tabs. The project is the ios-android template with the addition of the voyager library for navigation. After testing out tab navigation I found that the iOS app would no longer work.
If the bug is Android-only, report it in the Jetpack Compose tracker
Versions
To Reproduce Steps and/or the code snippet to reproduce the behavior: Run the ios app
Expected behavior iOS app runs and builds
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.