How to inspect proguard process, so I know what takes so long?

北城余情 提交于 2020-01-02 08:13:01

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/36850867/how-to-inspect-proguard-process-so-i-know-what-takes-so-long

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!