如何在构建Android Studio项目时添加Stacktrace或调试选项?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (55)

我试图调查控制台输出中的项目构建错误,如下所示:

:myapp:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
...
...

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
提问于
用户回答回答于

你可以使用GUI从中添加这些gradle命令行标志:

File > Settings > Compiler (Gradle-based Android Project)

对于MacOS用户,它在这里:

Android Studio > Preferences > Build, Execution, Deployment > Compiler

像这样(添加--stacktrace--debug):

用户回答回答于

Mac版本上Android Studio Beta 1.2,它在下面:

Android Studio->preferences->Build, Execution, Deployment->Compiler

扫码关注云+社区