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
