p3c-common编译运行时报Could not find matching constructor错误

jslywgbw  于 2个月前  发布在  其他
关注(0)|答案(7)|浏览(27)

Describe the bug

插件项目代码在本地运行时,报如下错误:
A problem occurred configuring project ':p3c-common'.
Could not find matching constructor for: org.gradle.api.publish.ivy.internal.publisher.IvyDescriptorFileGenerator(org.gradle.api.publish.ivy.internal.publication.DefaultIvyPublicationIdentity)

To Reproduce
Steps to reproduce the behavior:

环境:gradle 版本为 6.6

  1. 执行命令:
    cd p3c-idea
    ../gradlew clean buildPlugin
  2. 执行命令
    ../gradlew runIde
  3. 后台报错

Expected behavior
命令执行正常,能生成插件

uelo1irk

uelo1irk1#

C:\project\p3c-master\idea-plugin\p3c-idea>..\gradlew.bat clean buildPlugin

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':p3c-common'.
    Could not find matching constructor for: org.gradle.api.publish.ivy.internal.publisher.IvyDescriptorF
    ileGenerator(org.gradle.api.publish.ivy.internal.publication.DefaultIvyPublicationIdentity)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
    output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s

svujldwt

svujldwt2#

The same problem win10 ideaIU-2021.1.3.win
C:\project\p3c-master\idea-plugin\p3c-idea>..\gradlew.bat clean buildPlugin

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':p3c-common'.
    Could not find matching constructor for: org.gradle.api.publish.ivy.internal.publisher.IvyDescriptorF
    ileGenerator(org.gradle.api.publish.ivy.internal.publication.DefaultIvyPublicationIdentity)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
    output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s

sh7euo9m

sh7euo9m3#

@jiyonglian@OrangeMoonOrange@wu-xue-zhi

好吧 建议迁移至 https://github.com/XenoAmess/p3c

如果想要停留在阿里版的同时成功编译 也可以选择抄我那边的构建脚本。

任何有0.5天以上gradle经验的人都可以轻松完成从我那边抄来构建脚本对阿里版的代码的对应迁移

monwx1rj

monwx1rj4#

升级插件到0.7.3即可
plugins {
id "org.jetbrains.intellij" version "0.7.3"
}

xxb16uws

xxb16uws6#

这个问题能解决吗

rbl8hiat

rbl8hiat7#

建议重写构建脚本
实在不行可以抄我那边。

相关问题