Skip to content

fix(android): align nitro-fetch NDK version - #179

Merged
riteshshukla04 merged 1 commit into
margelo:mainfrom
huytdps13400:fix/178-pin-ndk-version
Aug 25, 2026
Merged

fix(android): align nitro-fetch NDK version#179
riteshshukla04 merged 1 commit into
margelo:mainfrom
huytdps13400:fix/178-pin-ndk-version

Conversation

@huytdps13400

Copy link
Copy Markdown
Contributor

Summary

  • configure the react-native-nitro-fetch Android library with the consuming root project's ndkVersion
  • fall back to the existing NitroFetch_ndkVersion package property when the root does not override it
  • match the configuration already used by the WebSocket and text-decoder sibling packages

Fixes #178.

Verification

The same Gradle model probe was run before and after the change:

before: NITRO_FETCH_NDK_VERSION=27.0.12077973
after:  NITRO_FETCH_NDK_VERSION=27.1.12297006

Additional checks:

  • bun test — 10 passed, 2 existing TODOs
  • bun typecheck
  • bun lint — no errors (2 existing no-shadow warnings in unrelated Expo plugin files)
  • ./gradlew :react-native-nitro-fetch:assembleDebug -PreactNativeArchitectures=arm64-v8a — successful
  • generated CMake cache points to NDK 27.1.12297006
  • llvm-readelf -Ws libnitrofetch.so contains no __cxa_init_primary_exception reference

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@huytdps13400 is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

@riteshshukla04

Copy link
Copy Markdown
Collaborator

Yeah thanks. Ideally this should be fixed by RN itself. I have an issue opened there. But this works for now

@huytdps13400

Copy link
Copy Markdown
Contributor Author

That makes sense. This keeps nitro-fetch aligned with the consuming React Native project's selected NDK in the meantime, and can be revisited once the upstream RN/AGP behavior guarantees that alignment for libraries. I'll keep an eye on the upstream issue and adjust this PR if you prefer a different interim approach.

@riteshshukla04

Copy link
Copy Markdown
Collaborator

Ideally RN should never use NDK 27 with AGP 9. The default version is NDK 28

@riteshshukla04
riteshshukla04 merged commit c7cbe60 into margelo:main Aug 25, 2026
6 of 7 checks passed
@huytdps13400

huytdps13400 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Agreed. The merged change does not pin NDK 27; it delegates to the consuming root project’s ndkVersion. Once the React Native template/toolchain selects NDK 28 for AGP 9, nitro-fetch will follow that value automatically instead of compiling with a separate AGP default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android AGP 9: missing ndkVersion causes __cxa_init_primary_exception crash on launch

2 participants