导入GoogleWebRTC Pod失败:找不到模块“ GoogleWebRTC”

雷米·范斯提兰特(RémiVansteelandt)

我目前正在开发Kotlin跨平台,并且正在尝试与GoogleWebRTC pod进行交互。

该pod存在,我能够将其导入一个单独的项目中(没有Kotlin多平台)。我可以.framework在构建目录中看到创建的,但是在进行gradle同步或从Xcode进行构建时,出现以下错误:

Exception in thread "main" java.lang.Error: /var/folders/hv/9cx28nxx4gz9hj_m86bp5rx40000gn/T/tmp362966650322311128.m:1:9: fatal error: module 'GoogleWebRTC' not found
    at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
    at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:67)
    at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:13)
    at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:499)
    at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:264)
    at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:72)
    at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
    at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:19)
    at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:37)

Execution failed for task ':shared:cinteropGoogleWebRTCIosArm64'.
> Process 'command '/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

AFNetworking似乎工作正常,但是添加WebRTC pod似乎破坏了项目。

我是否缺少Kotlin多平台的限制?

这是我的build.gradle.kts

    cocoapods {
        // Configure fields required by CocoaPods.
        summary = "Some description for a Kotlin/Native module"
        homepage = "Link to a Kotlin/Native module homepage"

        // You can change the name of the produced framework.
        // By default, it is the name of the Gradle project.
        frameworkName = "shared"
        ios.deploymentTarget = "10.0"

        pod("GoogleWebRTC", "~> 1.1")
        pod("AFNetworking", "~> 4.0.0")
    }
影子羊

我能够重现此问题,但我不知道原因。

GoogleWebRTC pod和Kotlin本机/ cocoapods集成似乎出了问题。

我在这里开了一个问题

我们有官方帮助。

似乎框架名称与pod名称不同。因此,可能的解决方案可能是:

kotlin {
    cocoapods {
        [...]
        pod("GoogleWebRTC", moduleName = "WebRTC", version = "~> 1.1")
        [...]
    }
    [...]
}

我试过了,它有效。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

GoogleWebRTC 挂起(冻结)swift 本机应用程序(OpenVidu)中的主线程

找不到导入的模块?

Pyinstaller:导入错误:DLL加载失败:找不到指定的模块

Pyinstaller 导入错误:DLL 加载失败:找不到指定的模块

DLL加载失败:导入scipy时找不到指定的模块

找不到Vue模块导入

尝试导入sklearn模块时出错:ImportError:DLL加载失败:找不到指定的模块

无法导入PIL的'_imaging'模块:DLL加载失败:找不到指定的模块

cx_Freeze ImportError:导入_ctypes时,DLL加载失败失败:找不到指定的模块

尝试安装 TensorFlow-GPU...因导入错误而失败:DLL 加载失败:找不到指定的模块

将Swift Pod导入Objective-C项目时找不到模块错误

导入matplotlib._png作为_png导入:错误:DLL加载失败:找不到指定的模块

导入错误:DLL 加载失败:找不到指定的模块。在尝试导入 TensorFlow 时

打字稿-导入模块-找不到模块

导入嵌套模块时找不到模块

OpenCV-Python 导入错误:DLL 加载失败:找不到指定的模块

从scipy.linalg导入_fblas:ImportError:DLL加载失败:找不到指定的模块

发生异常:导入pdftotext时,ImportError DLL加载失败:找不到指定的模块

ImportError:导入_psycopg时DLL加载失败:找不到指定的模块

使用conda从Anaconda导入numpy时出错(DLL加载失败:找不到指定的模块)

从 sklearn 导入“kfold”时出现“DLL 加载失败:找不到指定的模块”错误

ImportError:导入pyexpat时DLL加载失败:找不到指定的模块

导入错误:DLL加载失败:使用cxfreeze时找不到指定的模块

导入ft2font时DLL加载失败:找不到指定的模块

导入时Webpack找不到图像-找不到模块

找不到模块 - 在 NextJS 中导入 svgs

导入时找不到模块错误

JavaScript错误:找不到导入的模块

反应无法导入组件-找不到模块