![]() ![]() ![]() R8 achieves better inlining and outlining (extracting common code into a function) than Proguard, whereas the latter is better at propagating constant arguments. ![]() For starters, R8 has limited support for Kotlin, whereas Proguard was built for Java toolchains. While both tools help with code compaction, R8 has richer functionality than code shrinking. However, since Android Gradle Plugin (AGP) v 3.4.0, Android has used the R8 compiler. In the early versions of Android, code shrinking and optimization were delegated to a tool called Proguard. Using both of these strategies will ensure that your app is faster to download and more difficult to modify by others. In addition to shrinking, obfuscating is another tactic that allows us to guard our Android apps against reverse engineering. A guide to R8 and code shrinking in AndroidĬode shrinking is an approach that allows us to generate smaller APKs by removing unused code or refactoring existing code, resulting in a smaller footprint. Be wary, observations may be interlaced with humor. Anvith Bhat Follow I'm passionate about creating stuff around Android. ![]()
0 Comments
Leave a Reply. |