My app using some jar libs with too many methods, but in fact used only 2-3 methods from this libs. Total size of this libs more than 2Mb. I don't need all of it and i want to shrink my apk with ProGuard.
I need to enable ProGuard and configure it only for remove unused code and shrink apk size. but I don't know how. I don't want to obfuscate my app and etc. only shrink final size.
I try to enable proguard by
minifyEnabled true
but it got only errors and nothing.
To only shrink your application you should do the following:
The
proguard-shrink-only.txt
should contain the following options:The
proguard-project.txt
should contain your project specific keep rules that might be needed for classes that are used via reflection.