ForteScarlet / simple-robot-component-mirai-springboot-starter

a springboot starter for component-mirai
2 stars 0 forks source link

mirai版本更新后利用gradle打包失败 #1

Closed liuc-c closed 3 years ago

liuc-c commented 3 years ago

更新了版本后,提示打包出错,没改过别的任何代码,版本回退后又可以正常打包运行。百度过后发现mirai2.0-M1-1之后的版本好像都遇到这个问题

更新之前版本:component-mirai-spring-boot-starter:2.0.0-ALPHA.10 更新后版本:component-mirai-spring-boot-starter:2.0.0

以下为报错信息: Execution failed for task ':compileJava'.

Could not resolve all files for configuration ':compileClasspath'. Could not resolve net.mamoe:mirai-core-api:2.3.2. Required by: project : > love.forte.simple-robot:component-mirai-spring-boot-starter:2.0.0 > love.forte.simple-robot:component-mirai:2.0.0 > net.mamoe:mirai-core-jvm:2.3.2 The consumer was configured to find an API of a library compatible with Java 11, preferably in the form of class files, and its dependencies declared externally. However we cannot choose between the following variants of net.mamoe:mirai-core-api:2.3.2:

  • commonApiElements-published
  • jvmApiElements-published All of them match the consumer attributes:
  • Variant 'commonApiElements-published' capability net.mamoe:mirai-core-api:2.3.2 declares an API of a component, packaged as a jar:
  • Unmatched attributes:
  • Doesn't say anything about its component category (required a library)
  • Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
  • Doesn't say anything about its target Java version (required compatibility with Java 11)
  • Provides release status but the consumer didn't ask for it
  • Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'common' but the consumer didn't ask for it
  • Variant 'jvmApiElements-published' capability net.mamoe:mirai-core-api:2.3.2 declares an API of a component, packaged as a jar:
  • Unmatched attributes:
  • Doesn't say anything about its component category (required a library)
  • Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
  • Doesn't say anything about its target Java version (required compatibility with Java 11)
  • Provides release status but the consumer didn't ask for it
  • Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it The following variants were also considered but didn't match the requested attributes:
  • Variant 'commonMainMetadataElements-published' capability net.mamoe:mirai-core-api:2.3.2:
  • Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed an API of a component
  • Other compatible attributes:
  • Doesn't say anything about its component category (required a library)
  • Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
  • Doesn't say anything about its target Java version (required compatibility with Java 11)
  • Doesn't say anything about its elements (required them preferably in the form of class files)
  • Variant 'metadataApiElements-published' capability net.mamoe:mirai-core-api:2.3.2:
  • Incompatible because this component declares a usage of 'kotlin-metadata' of a component and the consumer needed an API of a component
  • Other compatible attributes:
  • Doesn't say anything about its component category (required a library)
  • Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
  • Doesn't say anything about its target Java version (required compatibility with Java 11)
  • Doesn't say anything about its elements (required them preferably in the form of class files)
ForteScarlet commented 3 years ago
Could not resolve net.mamoe:mirai-core-api:2.3.2.

很多人都遇到了 net.mamoe:mirai-core-api:2.3.2 下载不了的情况,试试挂个VPN,或者换上一个版本component-mirai-spring-boot-starter:2.0.0-RC.4之类的试试,以及....实际上你应该从这里进行反馈 -> https://github.com/ForteScarlet/simpler-robot

ForteScarlet commented 3 years ago

可以参考 mirai #746,以及 simbot 下一个版本会更新mirai版本,或许也会有所改善

liuc-c commented 3 years ago

谢谢,我本来打算在https://github.com/ForteScarlet/simpler-robot反馈,但想了想,或许这个问题是属于这个组件的问题就找来这边反馈了,hhh

ForteScarlet commented 3 years ago

233, 实际上2.0以后所有的组件都包含在那个项目里了,所以放心大胆反馈就好 以及,你也可以试试把simbot里的 net.mamoe:mirai-core-jvm:2.3.2 更替为更新的 2.4.0 能不能有效果