MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    这是怎么回事呢?Windows上可以,Linux上就不行了

    BUG反馈
    3
    5
    107
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      laocunzhang last edited by cssxsh

      Exception in thread "Thread-12" java.util.ServiceConfigurationError: net.mamoe.mirai.IMirai: Provider net.mamoe.mirai.internal.MiraiImpl could not be instantiated
      	at java.util.ServiceLoader.fail(ServiceLoader.java:232)
      	at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
      	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
      	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
      	at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
      	at kotlin.collections.CollectionsKt___CollectionsKt.firstOrNull(_Collections.kt:270)
      	at net.mamoe.mirai.Mirai.findMiraiInstance(IMirai.kt:357)
      	at net.mamoe.mirai._MiraiInstance.get(IMirai.kt:351)
      	at net.mamoe.mirai.Mirai.getInstance(IMirai.kt:41)
      	at net.mamoe.mirai.BotFactory$INSTANCE.newBot(BotFactory.kt:115)
      	at com.zhang.game.adm.daemons.QQbot.<init>(QQbot.java:107)
      	at com.zhang.game.adm.daemons.QQbot.getInstance(QQbot.java:80)
      	at com.zhang.game.adm.GameServer$3.run(GameServer.java:439)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NoSuchMethodError: net.mamoe.mirai.utils.ServicesKt.loadServices(Lkotlin/reflect/KClass;)Lkotlin/sequences/Sequence;
      	at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.<init>(MessageProtocolFacade.kt:194)
      	at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.<init>(MessageProtocolFacade.kt:162)
      	at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.<clinit>(MessageProtocolFacade.kt)
      	at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade.<clinit>(MessageProtocolFacade.kt)
      	at net.mamoe.mirai.internal.MiraiImplKt._MiraiImpl_static_init(MiraiImpl.kt:25)
      	at net.mamoe.mirai.internal.MiraiImpl.<clinit>(MiraiImpl.kt:94)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at java.lang.Class.newInstance(Class.java:442)
      	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
      	... 11 more
      
      1 Reply Last reply Reply Quote 0
      • cssxsh
        cssxsh last edited by cssxsh

        文件不全。或者版本不一致

        L 1 Reply Last reply Reply Quote 0
        • L
          laocunzhang @cssxsh last edited by

          @cssxsh
          不应该啊,完全一样的,换个环境就不行了

          1 Reply Last reply Reply Quote 0
          • Nambers
            Nambers 摸鱼 last edited by

            你这是什么环境(
            如果是 native 的话要先注册 https://github.com/mamoe/mirai/blob/dev/mirai-core/src/nativeMain/kotlin/MiraiImpl.kt#L18

            L 1 Reply Last reply Reply Quote 0
            • L
              laocunzhang @Nambers last edited by

              @Nambers
              mirai-core-jvm
              2.13.2
              Linux

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact