android-support-v4 remove unused classes

自闭症网瘾萝莉.ら 提交于 2020-01-14 10:23:17

问题


Bacially, I am trying to shrink my application's .apk down to the smallest size possible. I currently have android-support-v4 jar file imported. My question is this: how do I remove unused classes from this jar file?

Not finding any information after quite a bit of searches. If ProGuard is the solution, text to include in my proguard-project.txt file would be appreciated.


回答1:


ProGuard indeed shrinks the size of applications. It treats application code (src/...) and library code (libs/..., library projects) the same, so you don't need to change the structure of your project. It is especially useful if you are using small parts of large libraries, since it removes the unused parts.

The Android developer guide explains how you can enable ProGuard for release builds. If your application doesn't perform any reflection, the default configuration (with an empty proguard-project.txt) should be sufficient.



来源:https://stackoverflow.com/questions/24709879/android-support-v4-remove-unused-classes

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