Tagged articles
15 articles
Page 1 of 1
Sohu Tech Products
Sohu Tech Products
Feb 25, 2026 · Mobile Development

Why R8 Beats D8: Deep Dive into Android’s Powerful Code Optimizer

This article explains the differences between D8 and R8, details R8’s advanced optimization techniques, discusses challenges like reflection and keep‑rules, and highlights recent tooling improvements and future features that make R8 essential for faster, smaller Android apps.

AndroidCode OptimizationMobile Development
0 likes · 9 min read
Why R8 Beats D8: Deep Dive into Android’s Powerful Code Optimizer
DeWu Technology
DeWu Technology
Sep 1, 2025 · Mobile Development

Why R8’s ApiModel Adds an Extra new‑instance Instruction and Crashes Android Apps

This article explains how R8’s ApiModel optimization can generate a redundant new‑instance bytecode that triggers class initialization failures, why synchronized or try‑catch blocks also cause the issue, and presents four practical solutions including disabling ApiModel, official patches, custom fixes, and business‑level refactoring.

AndroidApiModelCompilation
0 likes · 16 min read
Why R8’s ApiModel Adds an Extra new‑instance Instruction and Crashes Android Apps
DeWu Technology
DeWu Technology
Dec 9, 2024 · Fundamentals

Deadlock Caused by Do-While Loop in Plugin

A mobile app deadlock was traced to a do‑while loop introduced by a weaver plugin that concurrently copied method nodes, causing ASM label‑node mismatches; adding thread synchronization to the method‑cloning process resolved the issue and underscores the concurrency risks of bytecode instrumentation.

R8Software EngineeringWeaver
0 likes · 10 min read
Deadlock Caused by Do-While Loop in Plugin
Kuaishou Frontend Engineering
Kuaishou Frontend Engineering
Oct 18, 2023 · Mobile Development

Why Upgrading to AGP 7.0.1 Increased APK Size and How We Fixed It

After upgrading Kuaishou's Android project from AGP 3.4.2 to 7.0.1, the APK size unexpectedly grew despite faster builds, leading to a deep investigation of Dex compression, R8 changes, and build tool versions, ultimately revealing a fastutil library mismatch that was resolved by forcing the correct version.

AGPAPK sizeAndroid
0 likes · 16 min read
Why Upgrading to AGP 7.0.1 Increased APK Size and How We Fixed It
Meituan Technology Team
Meituan Technology Team
May 18, 2023 · Mobile Development

Adapting Meituan's Android Robust Hot‑Fix Framework to R8 and Optimization Strategies

The article explains how Meituan migrated its method‑instrumentation hot‑fix system Robust from ProGuard to Google’s R8 by moving change detection ahead of optimization, disabling or tuning R8’s built‑in optimizations, and implementing special handling for anonymous classes, inlined methods, super calls, constructors and static initializers to ensure reliable patch generation.

AndroidHotfixProGuard
0 likes · 21 min read
Adapting Meituan's Android Robust Hot‑Fix Framework to R8 and Optimization Strategies
JD Retail Technology
JD Retail Technology
Dec 23, 2022 · Mobile Development

Comprehensive Package Slimming and Governance Practices for JD Android App

This article details JD's Android app package‑size reduction journey, covering component analysis with APK Analyzer and zipinfo, dependency mapping via Gradle, a suite of slimming measures such as plugin‑to‑download, resource compression, R8, 7‑zip, and a systematic governance framework that ties component growth to enforceable size‑control policies, ultimately achieving over 30% reduction in APK size.

AndroidGradlePackage Analysis
0 likes · 24 min read
Comprehensive Package Slimming and Governance Practices for JD Android App
Baidu Geek Talk
Baidu Geek Talk
Jul 18, 2022 · Mobile Development

Baidu App APK Size Optimization: Fundamentals, Tools, and Practices

The article explains why reducing APK size improves download conversion and performance, then details a systematic, divide‑and‑conquer approach for Baidu App that trims Dex, resources, native libraries and ZIP overhead using tools such as R8, AndResGuard, ByteX, Booster and AGP, achieving a reduction from roughly 123 MB to 115 MB with up to 6 MB saved per batch and outlining plans to open‑source the utilities.

APK OptimizationAndroidDEX
0 likes · 17 min read
Baidu App APK Size Optimization: Fundamentals, Tools, and Practices
JD Retail Technology
JD Retail Technology
Jun 1, 2022 · Mobile Development

Migrating JD Android App to R8: Obfuscation Rules, v1 Signing Issues, and Build Process Pitfalls

This article details JD's Android app migration to the R8 compiler, explains differences between ProGuard and R8, analyzes the impact of the -useuniqueclassmembernames rule, addresses v1 signing loss after AGP 3.6.4 upgrade, and provides practical solutions for build‑process ordering and packaging pitfalls.

AGPAndroidBuild Optimization
0 likes · 23 min read
Migrating JD Android App to R8: Obfuscation Rules, v1 Signing Issues, and Build Process Pitfalls
Baidu App Technology
Baidu App Technology
Mar 17, 2022 · Mobile Development

Baidu App APK Size Optimization: Principles, Tools, and Implementation

The Baidu App team applied a systematic, sustainable approach—combining Dex, resource, and native‑library optimizations with tools such as R8, ProGuard, AndResGuard, and custom compression pipelines—to shrink the APK by several megabytes, improve download conversion, and establish reusable mechanisms for future builds.

APKAndroidDEX
0 likes · 20 min read
Baidu App APK Size Optimization: Principles, Tools, and Implementation
Sohu Tech Products
Sohu Tech Products
Jun 16, 2021 · Mobile Development

Android Code Obfuscation: ProGuard, R8, D8 and Build Process Deep Dive

This article provides a comprehensive guide to Android code obfuscation, covering the purpose and benefits of minification, detailed ProGuard/R8 configuration, resource shrinking, desugaring, D8/R8 internals, custom obfuscation dictionaries, and modular ProGuard rules for multi‑module projects.

AndroidD8Gradle
0 likes · 23 min read
Android Code Obfuscation: ProGuard, R8, D8 and Build Process Deep Dive