gpt4 book ai didi

c# - 缺少带有主调度程序的模块。添加提供主要调度程序的依赖项,例如 'kotlinx-coroutines-android'

转载 作者:太空宇宙 更新时间:2023-11-03 14:39:24 25 4
gpt4 key购买 nike

我尝试创建自己的 Xamarin Android 库绑定(bind)。
构建过程没问题。

但是当我在库上运行一些方法时,它会抛出异常

Java.Lang.IllegalStateException: 'Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android''

我尝试将 EmbeddedReferenceJar 添加到 kotlinx-coroutines-androidkotlinx-coroutines-core 但仍然出现同样的错误。

最佳答案

可能与此有关issue在 Xamarin.Android 中。已在 v 10.1 中修复,请参阅 release notes .

所以只需尝试更新 Visual Studio(可能是最新的预览版)

关于c# - 缺少带有主调度程序的模块。添加提供主要调度程序的依赖项,例如 'kotlinx-coroutines-android',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58006393/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com