小编Jér*_*lot的帖子

KMM:如何解决 abi 版本不兼容的问题。当前默认值为“1.4.2”,找到“1.5.0”。1.5.20编译器生成的库?

我正在制作一个KMM application,我已经完成了Android部分,没有任何问题,一切都很完美。

然而,当我启动iOS版本时,通过打开iosMyApp.xcworkspace文件并启动编译,会出现此错误。

The following Kotlin source sets were configured but not added to any Kotlin compilation:
 * androidAndroidTestRelease
 * androidTestFixtures
 * androidTestFixturesDebug
 * androidTestFixturesRelease
You can add a source set to a target's compilation by connecting it with the compilation's default source set using 'dependsOn'.
See https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets
w: skipping /Users/jeremieguillot/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-serialization-iosx64/1.6.3/1912839739c3051183691e878ef7e4d17366f4f4/ktor-client-serialization.klib. **Incompatible abi version. The current default is '1.4.2', found '1.5.0'. The library produced by 1.5.20 compiler**
e: Could not find "/Users/jeremieguillot/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-serialization-iosx64/1.6.3/1912839739c3051183691e878ef7e4d17366f4f4/ktor-client-serialization.klib" in [/Users/jeremieguillot/AndroidStudioProjects/SpotABivouac/iosSpotApp/Pods, /Users/jeremieguillot/.konan/klib, /Users/jeremieguillot/.konan/kotlin-native-prebuilt-macos-1.5.10/klib/common, …
Run Code Online (Sandbox Code Playgroud)

android gradle ktor kotlin-multiplatform kotlin-multiplatform-mobile

6
推荐指数
1
解决办法
2405
查看次数

如何在 Android Jetpack Compose 中传递可选的布尔参数?

我试图在用户可以从欢迎页面显示欢迎消息时在仪表板上向用户显示欢迎消息。因此,在仪表板的路线中,我定义了一个可选参数。

无需任何参数即可访问它(因为它是可选的),但当我添加一个时,它就不再工作了。

       composable(Routes.welcome) {
            WelcomeScreen {
                navController.navigate("dashboard?isWelcome={true}")
            }
        }

        composable(
            "dashboard?isWelcome={isWelcome}}",
            arguments = listOf(
                navArgument("isWelcome") {
                    type = NavType.BoolType
                }
            )
        ) {
            val isFromWelcome = it.arguments?.getBoolean("isWelcome") ?: false
...
}
Run Code Online (Sandbox Code Playgroud)

我的错误是:

Navigation destination that matches request NavDeepLinkRequest{ uri=android-app://androidx.navigation/dashboard?isWelcome={true} } cannot be found in the navigation graph
Run Code Online (Sandbox Code Playgroud)

谢谢你的建议 :)

android android-jetpack android-architecture-navigation android-jetpack-compose

1
推荐指数
1
解决办法
4210
查看次数