Android的Studio和摇篮建立自己的错误 [英] Android Studio and Gradle build error
问题描述
我一直在使用的Android工作室的新preVIEW,真正喜欢它。但最近我的项目将无法生成。我得到以下错误:
I've been using the new preview of android studio and really like it. But recently my project won't build. I get the following error:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':TestProj:compileDebug'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
问题是如何启用的堆栈跟踪,所以我可以为错误的根源。由于这是我真的不知道是什么导致了这一点。
Question is how do I enable the stack trace so I can get to the root of the error. As it is I really have no idea what's causing this.
推荐答案
如果您使用的是摇篮包装(在Android的工作室推荐选项),启用堆栈跟踪运行 gradlew compileDebug --stacktrace
从项目的根目录下的命令行(其中 gradlew
文件)。
If you are using the Gradle Wrapper (the recommended option in Android Studio), you enable stacktrace by running gradlew compileDebug --stacktrace
from the command line in the root folder of your project (where the gradlew
file is).
如果您不使用摇篮包装,使用摇篮compileDebug --stacktrace
,而不是(presumably)。
If you are not using the gradle wrapper, you use gradle compileDebug --stacktrace
instead (presumably).
您并不需要用运行 -
虽然堆栈跟踪, gradlew compileDebug
本身,从运行在命令行,应该告诉你错误所在。
You don't really need to run with --stacktrace
though, running gradlew compileDebug
by itself, from the command line, should tell you where the error is.
我基于此评论这些信息:
I based this information on this comment:
<一个href="http://stackoverflow.com/questions/16580776/android-studio-new-project-can-not-run-throwing-error#comment23901058_16580776">Android工作室新的项目不能运行,抛出错误
这篇关于Android的Studio和摇篮建立自己的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!