Kotlin 多平台中的 Pod Google MLKit - cinterop-GoogleMLKit.klib 不存在

问题描述 投票:0回答:1

当我尝试使用 Google ML Kit pod 时,出现错误。

KMP 配置:

cocoapods {
        summary = "Summary"
        homepage = "Page"
        version = "1.0.0"
        ios.deploymentTarget = "14.1"
        framework {
            baseName = "library"
            extraSpecAttributes["resources"] = "['src/commonMain/resources/**']"
        }
        pod("GoogleMLKit/TextRecognition"){
            version = "3.2.0"
        }
    }

错误:

:library:iosMain: cinterop file: /Users/user/library-sdk/library/build/classes/kotlin/iosArm64/main/cinterop/library-cinterop-GoogleMLKit.klib does not exist 

我尝试更改库,删除目标,现在是:

 //iosX64()
 iosArm64()
 //iosSimulatorArm64()
ios kotlin cocoapods kotlin-multiplatform
1个回答
0
投票

试试这个

pod("GoogleMLKit/TextRecognition") {
    moduleName = "MLKitTextRecognition"
    version = "3.2.0"
}
© www.soinside.com 2019 - 2024. All rights reserved.