欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Android Studio Gradle编译 参数配置

程序员文章站 2024-01-11 20:15:52
...

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

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