Android Studio:编译器错误输出窗口在哪里? [英] Android Studio: Where is the Compiler Error Output Window?

查看:54
本文介绍了Android Studio:编译器错误输出窗口在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 Android Studio 中运行"我的项目时,在消息"窗口中,我得到:

Gradle:FAILURE:构建失败,出现异常.* 什么地方出了错:任务 ':play01:compileDebug' 执行失败.>编译失败;有关详细信息,请参阅编译器错误输出.* 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪.使用 --info 或 --debug 选项运行以获得更多日志输出.

上面写着>编译失败;详情见编译器错误输出.那么编译器错误输出"在哪里?和/或如何使用 --stacktrace 选项运行?

解决方案

此答案已过时.

When I 'Run' my project in Android Studio, in the 'Messages' window, I get:

Gradle: 
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':play01: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.

It says > Compilation failed; see the compiler error output for details. So where is the "compiler error output"? And/Or how do I run with --stacktrace option?

解决方案

This answer is outdated. For Android 3.1 Studio go to this answer

One thing you can do is deactivate the external build. To do so click on "compiler settings icon" in the "Messages Make" panel that appears when you have an error. You can also open the compiler settings by going to File -> Settings -> Compiler. (Thanx to @maxgalbu for this tip).

Uncheck "Use External build"

And you will see the errors in the console

EDIT: After returning to "internal build" again you may get some errors, you can solve them this way: Android Studio: disabling "External build" to display error output create duplicate class errors

这篇关于Android Studio:编译器错误输出窗口在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆