I'm trying for my first time an Android Studio version with R8 that perform obfuscation and code optimization.
As the official documentation says:
Obfuscate your code
The purpose of obfuscation is to reduce your app size by shortening the names of your app’s classes, methods, and fields.
I think that R8 will rename all method and class names, but if I analyze the APK through "Build -> Analyze APK..." I can read most of the original method and class names.
Contenuti
is an Activity mentioned in the manifest.xml
.
mostraView
and nascondiView
are methods created by me, they aren't in any library, they don't extend nothing, so I expected to see their name changed.
void mostraView(View v)
{
v.setVisibility(View.VISIBLE);
}
void nascondiView(View v)
{
v.setVisibility(View.GONE);
}
Is this R8's behavior correct?
How to set R8 to obfuscate all of them, or at least these two?
Thanks a lot!