Wednesday, 6 November 2019

Why does R8 not rename all methods and classes?

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.

enter image description here enter image description here

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.

Is this R8's behavior correct? How to set R8 to obfuscate all of them, or at least these two?

Thanks a lot!



from Why does R8 not rename all methods and classes?

No comments:

Post a Comment