Proguard shrinks too much
Posted
by
vRallev
on Stack Overflow
See other posts from Stack Overflow
or by vRallev
Published on 2012-03-24T11:26:17Z
Indexed on
2012/03/24
11:29 UTC
Read the original article
Hit count: 221
Since ADT 17 you can find in the gen folder a BuildConfig class with a DEBUG constant. I often use this constant in my code, since ADT changes the value automatically when you export the application.
However with Proguard this doesn't work anymore. E.g. I have following snippet:
if (!BuildConfig.DEBUG) {
ACRA.init(this);
}
Proguard notices, that DEBUG is true, so it removes this snippet completely and shrinks the app. After that ADT changes DEBUG constant, but this is too late.
The only solution I know is to create my own DEBUG constant and to change it manually again. But I really like the functionality of ADT. Do you know a better solution?
Thanks in advance.
© Stack Overflow or respective owner