作者:手机用户2602916425 | 来源:互联网 | 2023-01-31 13:19
我正在尝试构建位于此处的Java项目:https : //github.com/garlicPasta/dotServer
我是Gradle的新手。我现在下载了最新的Gradle(v4.0)。我在路径中添加了bin
Gradle文件夹(包括gradle.bat
),以便可以在任何地方运行gradle命令。该项目似乎需要Google protobuf,并会自动下载。但是,当我启动命令时gradle build
,出现以下错误:
> Configure project :
You are using Gradle 4.0: This version of the protobuf plugin works with Gradle version 2.12+
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'dotServer'.
> No signature of method: org.gradle.api.internal.tasks.DefaultTaskInputs.source() is applicable for argument types: (com.google.protobuf.gradle.ProtobufSourceDirectorySet_Decorated) values: [main Proto source]
Possible solutions: collect(), use([Ljava.lang.Object;)
问题出在哪里?有人可以尝试构建项目并让我知道吗?
1> The incredib..:
我刚升级到Android Studio 3,并且在升级Gradle及其插件时遇到了同样的问题。
我们使用Google Protobuf,它包含在build.gradle中,版本为0.7.6。我只是更改为0.8.3而已构建。
buildscript {
...
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
}
}