升级 Corda Gradle 插件版本后无法使用 Gradle 构建项目
Unable to build project using Gradle after upgrading Corda Gradle Plugins Version
在我的 CorDapp 的 build.gradle
文件中更新 ext.corda_gradle_plugins_version
后,项目无法构建。
当 运行 从 IntelliJ 构建时,出现以下错误:
Error:Unable to find method 'kotlin.text.CharsKt.checkRadix(I)I'.
Possible causes for this unexpected error include:
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
- Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
当 运行 使用 Gradle 包装器从命令行构建时,我得到:
- What went wrong:
A problem occurred evaluating root project 'oracle-example'.
Failed to apply plugin [id 'net.corda.plugins.cordformation']
Could not create plugin of type 'Cordformation'.
Could not initialize class net.corda.plugins.Cordformation
我该如何解决这个问题?
您需要更新 Gradle 包装器版本。
最简单的方法是用使用所需 Gradle 插件版本(例如 https://github.com/corda/cordapp-example)的示例项目覆盖项目的 ./gradle
文件夹。
在我的 CorDapp 的 build.gradle
文件中更新 ext.corda_gradle_plugins_version
后,项目无法构建。
当 运行 从 IntelliJ 构建时,出现以下错误:
Error:Unable to find method 'kotlin.text.CharsKt.checkRadix(I)I'. Possible causes for this unexpected error include:
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
- Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
当 运行 使用 Gradle 包装器从命令行构建时,我得到:
- What went wrong: A problem occurred evaluating root project 'oracle-example'. Failed to apply plugin [id 'net.corda.plugins.cordformation'] Could not create plugin of type 'Cordformation'. Could not initialize class net.corda.plugins.Cordformation
我该如何解决这个问题?
您需要更新 Gradle 包装器版本。
最简单的方法是用使用所需 Gradle 插件版本(例如 https://github.com/corda/cordapp-example)的示例项目覆盖项目的 ./gradle
文件夹。