你好,我正在使用 kotlin 多平台开始我的第一个项目
我正在尝试通过添加这个来添加material3依赖性
implementation(libs.androidx.material3.android)
进入
commonMain.dependencies {...}
不幸的是,这并没有成功,但这些任务失败了
任务:composeApp:transformNativeMainCInteropDependenciesMetadataForIde 失败 任务:composeApp:transformAppleMainCInteropDependencyMetadataForIde 失败 任务:composeApp:transformIosMainCInteropDependencyMetadataForIde 失败 任务:composeApp:transformNativeTestCInteropDependencyMetadataForIde 失败 任务:composeApp:transformAppleTestCInteropDependencyMetadataForIde 失败 任务:composeApp:transformIosTestCInteropDependencyMetadataForIde 失败
我尝试将其添加到
androidMain.dependencies {..}
做得很完美,但我需要在普通勺子中使用它
期待您的答复,提前致谢。
您只能在
commonMain
中指定对KMP库的依赖关系。
如果您想使用 Material UI 开发 KMP 应用程序,请查看 Jetbrains 的 Compose Multiplatform https://www.jetbrains.com/compose-multiplatform/