android - enable proguard only for remove unused code -
my app using jar libs many methods, in fact used 2-3 methods libs. total size of libs more 2mb. don't need of , want shrink apk proguard.
i need enable proguard , configure remove unused code , shrink apk size. don't know how. don't want obfuscate app , etc. shrink final size.
i try enable proguard
minifyenabled true
but got errors , nothing.
to shrink application should following:
release { proguardfile getdefaultproguardfile('proguard-android.txt') proguardfile 'proguard-shrink-only.txt' proguardfile 'proguard-project.txt' }
the proguard-shrink-only.txt
should contain following options:
-dontobfuscate -dontoptimize
the proguard-project.txt
should contain project specific keep rules might needed classes used via reflection.
Comments
Post a Comment