Gradle 插件在 Intellij IDEA 中不起作用(计算任务图)?
Gradle plugin doesn't work in Intellij IDEA (Calculate task graph)?
问题是 Intellij IDEA 中的 Gradle 插件不适用于我的项目。如果我在命令行中使用 "Gradle build" 它可以完美地工作,但是如果我尝试使用 Intellij IDEA 中的 Gradle 插件构建项目它不起作用。它显示了任务 "Calculate task graph" 的一些错误。这是什么?
为什么不起作用?
控制台输出如下:
6:21:57 PM: Executing external tasks 'gradle build'...
FAILURE: Build failed with an exception.
* What went wrong:
Task 'gradle' not found in root project 'upload-server'.
* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.899 secs
Task 'gradle' not found in root project 'upload-server'.
6:22:01 PM: External tasks execution finished 'gradle build'.
添加到您的 build.gradle。并清理你的项目。显示你的任务。
repositories {
mavenCentral()
}
要查看错误,请单击左上角的该图标。它将在控制台输出视图和其他视图之间切换。
问题是因为我在插件中使用了 "gradle build" 命令来构建项目,但是在 gradle 插件中你不需要在任务之前使用 "gradle"。
所以,我 运行 "build" 命令现在可以正常工作了。
我面临同样的问题。当我使用 build.gradle(module.app)
版本不同。
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.android.gms:play-services-auth:11.0.1'
构建>清理项目
我看到了项目 运行 时看到的确切问题。
只需更正版本然后 运行 项目
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.android.gms:play-services-auth:11.0.0'
问题是 Intellij IDEA 中的 Gradle 插件不适用于我的项目。如果我在命令行中使用 "Gradle build" 它可以完美地工作,但是如果我尝试使用 Intellij IDEA 中的 Gradle 插件构建项目它不起作用。它显示了任务 "Calculate task graph" 的一些错误。这是什么?
为什么不起作用?
控制台输出如下:
6:21:57 PM: Executing external tasks 'gradle build'...
FAILURE: Build failed with an exception.
* What went wrong:
Task 'gradle' not found in root project 'upload-server'.
* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.899 secs
Task 'gradle' not found in root project 'upload-server'.
6:22:01 PM: External tasks execution finished 'gradle build'.
添加到您的 build.gradle。并清理你的项目。显示你的任务。
repositories {
mavenCentral()
}
要查看错误,请单击左上角的该图标。它将在控制台输出视图和其他视图之间切换。
问题是因为我在插件中使用了 "gradle build" 命令来构建项目,但是在 gradle 插件中你不需要在任务之前使用 "gradle"。
所以,我 运行 "build" 命令现在可以正常工作了。
我面临同样的问题。当我使用 build.gradle(module.app) 版本不同。
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.android.gms:play-services-auth:11.0.1'
构建>清理项目 我看到了项目 运行 时看到的确切问题。
只需更正版本然后 运行 项目
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.android.gms:play-services-auth:11.0.0'