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
推荐阅读
-
android studio gradle/gradle plugin 配置详解,解决"Gradle sync failed: Unknown host 'services.gradle.org'."
-
Android Studio Gradle编译 参数配置
-
Android Studio中修改gradle插件版本和Gradle版本
-
Gradle,Groovy与Android Studio中的Gradle详解
-
Android多渠道打包:gradle的配置
-
Gradle在Android Studio中的简单使用
-
Gradle在Android Studio中的应用技巧
-
android studio gradle 版本更新
-
Android Studio中Gradle使用详解
-
Android Studio 使用Gradle创建远程本地仓库,解决打包AAR包时丢失所有dependencies库