Android Studio Gradle编译 参数配置

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

添加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

你可能感兴趣的:(Android)