【问题标题】:Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.7-bin.zip'无法使用 Gradle 发行版“http://services.gradle.org/distributions/gradle-1.7-bin.zip”执行构建
【发布时间】:2013-10-18 16:43:32
【问题描述】:

我在 Windows 上创建了一个项目,当尝试使用 Ubuntu 打开和构建它时,我收到以下错误。谁能帮我整理一下?我看到帖子说将 0.5.+ 更改为 0.5.6,但这并没有帮助。

FAILURE: Build failed with an exception.

* Where:
Build file '/media/Data/Android/SivLtdProject/FitnessUnlimited/build.gradle' line: 9

* What went wrong:
A problem occurred evaluating project ':FitnessUnlimited'.
Cause: org/gradle/internal/reflect/Instantiator
Cause: org.gradle.internal.reflect.Instantiator

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

如果您需要发布任何其他内容,请告诉我。

经过一番折腾,我得到了错误 NoClassDefFoundError: org/gradle/internal/reflect/Instantiator

我通过 apt-get 安装了 gradle,我还需要做些什么来构建它吗?

【问题讨论】:

  • @user852671 使用--stacktrace 参数编写运行构建并粘贴结果。您还可以粘贴您的构建并写下哪一行是第 9 行。

标签: android gradle


【解决方案1】:

尝试使用来自 gradle.org 而不是来自 apt-get 的最新 gradle 发行版 (1.8) 以及最新的 Android gradle 插件:0.6.+ 或 0.6.1

另外使用--stacktrace 选项以获取有关该问题的更多详细信息。

【讨论】:

  • 我已经从 gradle.org 下载了 gradle 并且(希望)安装好了(从终端运行 gradle -version 输出正确的信息),但是当我尝试构建我的项目时,我仍然得到1.7 错误。我在哪里告诉它使用 gradle 1.8 而不是 1.7?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-05-22
  • 1970-01-01
  • 2021-06-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多