Android Studio Gradle编译 参数配置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ocean20/article/details/82423461

你是否在使用AS进行开发时遇到编译出现了错误,但是Build输出了只是简单的Task任务出错之类的信息,完全看不出哪里出现了问题。
其实只需要设置一下Gradle Command-line Options就可以了。
如下图:
这里写图片描述

添加option

--full-stacktrace

其它可用options
Debugging options
-?, -h, –help
Shows a help message with all available CLI options.

-v, –version
Prints Gradle, Groovy, Ant, JVM, and operating system version information.

-S, –full-stacktrace
Print out the full (very verbose) stacktrace for any exceptions. See also logging options.

-s, –stacktrace
Print out the stacktrace also for user exceptions (e.g. compile error). See also logging options.

–scan
Create a build scan with fine-grained information about all aspects of your Gradle build.

-Dorg.gradle.debug=true
Debug Gradle client (non-Daemon) process. Gradle will wait for you to attach a debugger at localhost:5005 by default.

-Dorg.gradle.daemon.debug=true
Debug Gradle Daemon process.

官方更多配置:
https://docs.gradle.org/current/userguide/command_line_interface.html

猜你喜欢

转载自blog.csdn.net/ocean20/article/details/82423461