FULL AI ANALYSIS

Release APK contains index.android.bundle but app crashes on startup with obfuscated NoSuchMethodError after enabling R8 — ProGuard keep rules may be incomplete

Generated Oct 15, 2026, 9:17:34 AM

Analysis summary

This report differs from the previous RN bundling issue: here the bundle exists but R8 has removed or renamed classes/methods that are referenced via reflection or JNI, which leads to NoSuchMethod/NoClass errors. The fix is targeted ProGuard rules that preserve classes and methods used by React Native's reflection/JNI registration style. The evidence that broad keep rules eliminate the crash supports this. A balanced set of keep rules is required rather than disabling minification entirely.

Possible causes

R8/ProGuard optimizations strip or rename classes and methods used by React Native's reflection or JNI registration (bridge/native modules), causing runtime NoSuchMethodError

95%

Third-party native modules do not bundle correct JNI registration metadata so R8 erroneously class-shrinks them

40%

Incomplete mapping upload process in CI leading to difficulty deobfuscating errors and misdiagnosing the keep rules needed

20%

Suggested fixes

1

Diagnostic step 1

Add known community-recommended minimal ProGuard keep rules for React Native (keep com.facebook.react.** and JNI/reflective method signatures) and rebuild. Test on representative devices and verify startup works.

2

Diagnostic step 2

Audit third-party native modules for reflective/JNI entry points and add keep rules for their package namespaces (keep class <module-package>.** { *; }).

3

Diagnostic step 3

Use R8's printmapping and shrinking reports to identify which classes/methods were removed and iteratively relax keep rules to find minimal set that prevents crashes while allowing shrinkage.

4

Diagnostic step 4

Automate mapping file upload and deobfuscation in CI to make crash investigation reproducible. If narrowing rules is hard, consider enabling minification but disabling obfuscation (keepnames) temporarily to retain size benefits while keeping symbols stable.

5

Diagnostic step 5

If uncertain about native/JNI boundaries or crashes continue on specific device models, collect full deobfuscated stack traces and escalate to React Native community or library authors with mapping.txt and repro APK attached.