R8, the new code shrinker from Google, is available in Android studio 3.3 beta
source link: https://chinagdg.org/2018/11/r8-the-new-code-shrinker-from-google-is-available-in-android-studio-3-3-beta/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
R8, the new code shrinker from Google, is available in Android studio 3.3 beta
Source: R8, the new code shrinker from Google, is available in Android studio 3.3 beta from Android Developer
Posted by Leo Sei, Product Manager on Android Studio and R8
Android developers know that APK size is an important factor in user engagement. Code shrinking helps reduce the size of your APK by getting rid of unused code and resources as well as making your actual code take less space (also known as minification or obfuscation).
That’s why we’re investing in improving code shrinking to make it faster and more efficient. We’re excited to announce that the next generation code shrinker, R8, is available for preview as part of Android Studio 3.3 beta.
R8 does all of shrinking, desugaring and dexing in one step. When comparing to the current code shrinking solution, Proguard, R8 shrinks the code faster while improving the output size.
The following data comes from benchmark on the Santa Tracker app, you can find the project with benchmark details on this GitHub repository.
How to try it
R8 is available with Android Studio 3.3 beta and works with Proguard rules. To try it, set the following in your project’s gradle.properties file:
android.enableR8=true
For the more adventurous, R8 also has full mode that is not directly compatible with Proguard. In order to try that out you can additionally set the following in your gradle.properties file:
android.enableR8.fullMode=true
This turns on more optimizations, that can further reduce app size. However, you might need a few extra keep rules to make it work.
We have tested R8 correctness and performances on a number of apps and the results are promising so we plan to switch R8 as the default shrinker in Android studio soon.
Please give R8 a try and we would love to hear your feedback. You can file a bug report using this link.
Recommend
-
8
ARCore SDK for Android Copyright 2017 Google LLC This SDK provides APIs for all of the essential AR features like motion tracking, environmental understanding, and light estimation. With these capabilities you can build entire...
-
9
Google 招聘信息泄露天机,Android Studio 可用于开发 Android 系统-51CTO.COM Google 招聘信息泄露天机,Android Studio 可用于开发 Android 系统 作者:Alias_Travis 2022-03-25 09:21:09 在 G...
-
6
[PATCH 0/4] Printbufs & shrinker OOM reporting Thread information [Search the linux-kernel archive]
-
4
Google Home extension for Visual Studio Code is now available Developers building for ...
-
9
Google Maps Street View gets historical browsing on Android & iOS, Studio tool, compact camera May 24,...
-
1
Google Makes its ‘Ads Creative Studio’ Tool Available to All Businesses Published July 14, 2022 By
-
5
Google Makes It Easy To Create Video Ads New Google Ads features include a video ad creation tool and a central location for creative assets....
-
2
Visual Studio Code Server Now Available in Private Preview Aug 02, 2022...
-
5
Teams Toolkit for Visual Studio Code 5 now available Ji Dong
-
3
GitLab for Visual Studio, including code suggestions, available in Beta Kai Armstrong · Jun 29, 2023 · 3 min read
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK