当我尝试使用 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()
试试这个
pod("GoogleMLKit/TextRecognition") {
moduleName = "MLKitTextRecognition"
version = "3.2.0"
}