MiraiForum

    • 注册
    • 登录
    • 搜索
    • 热门
    • 最新
    • 未解决
    • 标签
    • 群组
    • 友情链接

    [已解决]写了个json的配置文件测试时发生报错

    开发交流
    2
    2
    262
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • M
      Moo-OvO 最后由 Moo-OvO 编辑

      自己找到问题
      是打包问题 不过为什么用gradle原生打包会报错呢奇怪
      没用mirai打包出的插件(主要还是嫌弃太大了 470KB)

      java.lang.IllegalStateException: Exception while broadcasting event 'FriendMessageEvent'
      java.lang.IllegalStateException: Exception while broadcasting event 'FriendMessageEvent'
              at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast$suspendImpl(EventDispatcher.kt:96)
              at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$1.invokeSuspend(EventDispatcher.kt)
              at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
              at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:147)
              at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
              at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
              at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:147)
              at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
              at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
              at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
              at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
              at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
              at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
              at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
      Caused by: java.lang.IllegalStateException: 未找到异常处理器. 请继承 SimpleListenerHost 中的 handleException 方法, 或在 构造 SimpleListenerHost 时提供 CoroutineExceptionHandler
      

      ==================================================
      这里是部分 在报错最下面有一行我的读取API 跑了下没问题
      监听方法是继承SimpleListenerHost
      不知道哪里的问题

      1 条回复 最后回复 回复 引用 0
      • I
        imldy 最后由 编辑

        你好,怎么解决的?

        1 条回复 最后回复 回复 引用 0
        • 1 / 1
        • First post
          Last post
        Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact