Commit 4f9f24e
Use legacy JNI packaging for ARM64 Android E2E APKs (#58103)
Summary:
Follow-up to #58092.
Android API 35 x86_64 emulator images expose both `x86_64` and `arm64-v8a` through `libndk_translation.so`. SoLoader 0.12.1 only searches the first ABI when loading uncompressed native libraries directly from the APK, causing ARM64-only RNTester and template apps to crash while loading `libreactnative.so`.
Enable legacy JNI packaging through a CI-only Gradle init script so Android extracts the ARM64 libraries and the existing SoLoader `ApplicationSoSource` can load them. This applies only to dry-run RNTester builds and Android template E2E builds. Nightly and release packaging is unchanged.
Failure evidence: https://github.com/react/react-native/actions/runs/32741094253
## Changelog:
[INTERNAL] [FIXED] - Extract native libraries for ARM64 Android E2E APKs running through NDK translation.
Pull Request resolved: #58103
Test Plan:
- `./node_modules/.bin/prettier --check .github/actions/build-android/action.yml .github/workflows/e2e-android-templateapp.yml` — passed.
- Parsed both modified YAML files with the `yaml` Node package — passed.
- Parsed the embedded workflow shell scripts with `bash -n` — passed.
- Compiled `.github/workflow-scripts/legacy-jni-packaging.gradle` with the Groovy compiler bundled with Gradle 9.4.1 — passed.
- Full Android E2E validation is delegated to this draft PR because the local Gradle daemon could not establish its localhost connection.
Reviewed By: christophpurrer
Differential Revision: D117222109
Pulled By: cortinico
fbshipit-source-id: 65e09a38eed84474a2f50f7f5847e1676da4411b1 parent ab2ea64 commit 4f9f24e
3 files changed
Lines changed: 24 additions & 2 deletions
File tree
- .github
- actions/build-android
- workflow-scripts
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
0 commit comments