如何检查proguard过程,所以我知道需要这么久? [英] How to inspect proguard process, so I know what takes so long?

查看:213
本文介绍了如何检查proguard过程,所以我知道需要这么久?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的发布版本停留在

 :android:transformClassesAndResourcesWithProguardForRelease 

10分钟。 Gradle控制台不会打印任何内容。如何让它打印proguard正在做的事情,所以我知道问题出在哪里? 解决方案

您需要添加跟在你的proguard配置文件中:

  -verbose 

另外,您需要通过

  gradle为gradle build创建信息日志记录-i< target> 

其中target是您正在运行的实际任务(最有可能为assembleRelease)。



然后你会看到更多的输出和ProGuard目前正在做的事情。根据经验,优化步骤可能需要很长时间,因此您可能希望减少优化传递的次数:

 优化通过3 


My release build is stuck on

:android:transformClassesAndResourcesWithProguardForRelease

for 10 minutes. Gradle console does not print anything. How do I make it print what proguard is doing, so I know where the problem could be?

解决方案

You need to add the following to your proguard configuration file:

-verbose

Additionally, you need to enable info logging for your gradle build via

gradle -i <target>

where target is the actual task your are running (most likely assembleRelease).

Then you will see more output and what ProGuard is currently doing. Based on experience, the optimization step can take a long time, so you might want to reduce the number of optimization passes using:

-optimizationpasses 3

这篇关于如何检查proguard过程,所以我知道需要这么久?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆