MiraiForum

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

    java升级到2.7版本之后遇到的问题

    开发交流
    3
    4
    254
    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.
    • M
      mahaonan last edited by

      7ffcb311-620b-43b2-9d72-c0ee351c8904-image.png

      发现这些包类找不到,但是看maven依赖是有的,之前2.6版本的时候没这问题

          <dependency>
                  <groupId>net.mamoe</groupId>
                  <artifactId>mirai-core-jvm</artifactId>
                  <version>2.7.1-dev-1</version>
              </dependency>
      

      看字节码文件,发现有这个一行

      // This class file was compiled with different version of Kotlin compiler and can't be decompiled.
      //
      // Current compiler ABI version is 1.1.16
      // File ABI version is 1.5.1
      

      之前2.6的时候可以反编译成功,大概是因为编译版本不一致,由于不懂kotlin,不知道如何在idea中设置这些啊,有没有大佬告知一下,尝试了半天无果

      1 Reply Last reply Reply Quote 0
      • J
        JustOneSummer last edited by JustOneSummer

        手动添加
        版本

        <mirai.version>2.7.1-dev-1</mirai.version>
        
               <dependency>
                    <groupId>net.mamoe</groupId>
                    <artifactId>mirai-core-all</artifactId>
                    <version>${mirai.version}</version>
                </dependency>
                <dependency>
                    <groupId>net.mamoe</groupId>
                    <artifactId>mirai-core-api-jvm</artifactId>
                    <version>${mirai.version}</version>
                </dependency>
        
        1 Reply Last reply Reply Quote 0
        • J
          JustOneSummer last edited by JustOneSummer

          如果你是从低版本升级上来的可以参考我这个pom

          <properties>
                  <!--        mirai-->
                  <mirai.version>2.7.1-dev-1</mirai.version>
                  <mirai-selenium.version>1.0-dev-17</mirai-selenium.version>
                  <littleproxy.version>1.1.2</littleproxy.version>
                  <kotlin-reflect.version>1.5.10</kotlin-reflect.version>
              </properties>
              <dependencies>
                  <dependency>
                      <groupId>net.mamoe</groupId>
                      <artifactId>mirai-core-all</artifactId>
                      <version>${mirai.version}</version>
                  </dependency>
                  <dependency>
                      <groupId>net.mamoe</groupId>
                      <artifactId>mirai-core-api-jvm</artifactId>
                      <version>${mirai.version}</version>
                  </dependency>
                  <dependency>
                      <groupId>org.littleshoot</groupId>
                      <artifactId>littleproxy</artifactId>
                      <version>${littleproxy.version}</version>
                      <scope>runtime</scope>
                  </dependency>
                  <dependency>
                      <groupId>net.mamoe</groupId>
                      <artifactId>mirai-login-solver-selenium</artifactId>
                      <version>${mirai-selenium.version}</version>
                      <exclusions>
                          <exclusion>
                              <groupId>org.littleshoot</groupId>
                              <artifactId>littleproxy</artifactId>
                          </exclusion>
                      </exclusions>
                  </dependency>
                  <!--        解决最新版本的运行环境问题-->
                  <dependency>
                      <groupId>org.jetbrains.kotlin</groupId>
                      <artifactId>kotlin-reflect</artifactId>
                      <version>${kotlin-reflect.version}</version>
                  </dependency>
              </dependencies>
          
          1 Reply Last reply Reply Quote 0
          • B
            busi-hlj last edited by

            请问楼主解决了吗,一样的问题。现在不知道怎么办了。
            我现在拉取别人的项目,maven下载后也是一样的。。。

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