Skip to content

Commit 824786d

Browse files
authored
Add docs for multiple native lib architectures insight (#15569)
## DESCRIBE YOUR PR Adds documentation for the new Android multiple native library architecture splits insight. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [X] None: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) Resolves EME-644
1 parent ccbcef4 commit 824786d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/platforms/android/size-analysis/insights.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Below are a list of available insights for Android builds, followed by more deta
1818
| [WebP Optimization](#webp-optimization) | Tests PNG/JPEG bitmaps to see if lossless WebP would shrink them. |
1919
| [Large Audio](#large-audio) | Surfaces hefty audio tracks that could be recompressed or trimmed. |
2020
| [Hermes Debug Info (RN Only)](#hermes-debug-info-rn-only) | Points to bundled Hermes bytecode still carrying debugger metadata. |
21+
| [Multiple Native Library Architectures](#multiple-native-library-architectures) | Detects when multiple native library architectures are packaged in an APK. |
2122

2223
### Duplicate Files
2324

@@ -106,3 +107,26 @@ You can tweak the bitrate (`b:a`) to balance quality vs. size. Higher bitrates (
106107
**What it is**: Detects Hermes bytecode bundles that still contain debug info sections.
107108

108109
**How to fix**: Build the React Native bundle in release mode (`react-native bundle --dev false` or the Gradle release task) so Hermes strips debug sections before packaging.
110+
111+
### Multiple Native Library Architectures
112+
113+
**What it is**: Detects when multiple native libraries are packaged in an APK supporting different architectures. End user devices will only use one architecture (usually arm64_v8a), so most can be removed.
114+
115+
**How to fix**: Upload an AAB to the Play Store (Google will automatically pass the architecture the end user needs). We also recommend you upload an AAB for size analysis.
116+
117+
If you ship an APK, the `split {}` block can be used to output split APKs manually. If configured to skip ABI splits, Android will package all native library architectures into the main split.
118+
119+
Ensure your split Gradle dls config has the `isEnabled = true` field set for the `abi {}` block.
120+
121+
```kotlin
122+
android {
123+
splits {
124+
..
125+
126+
abi {
127+
isEnabled.set(true)
128+
}
129+
}
130+
}
131+
```
132+
More information about the ABI configuration for manual APK splits can be found in the [Android developer documentation](https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split).

0 commit comments

Comments
 (0)