Android Studio Gradle編譯 引數配置
你是否在使用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