callstack / callstack/react-native-draco
Android module is the create-react-native-library stub — Draco decode is unimplemented on Android
- Vorherrschende Sprache
- C++
- Sterne
- 10
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## Environment
@callstack/react-native-draco 0.3.0
React Native 0.86.0, new architecture
Expo SDK 57
iOS: works. Android: unimplemented.
## Description
`android/src/main/java/com/draco/DracoModule.kt` is still the create-react-native-library template: its one method is the example `multiply(a, b)`. There's no Draco decode on Android — the iOS side (`cpp/` + `ios/`) is fully implemented, but an app that installs this package gets working Draco on iOS and a no-op on Android. `codegenConfig.outputDir` also targets iOS only.
On RN 0.86 new arch we additionally saw the Android build fail on `NativeDracoSpec` codegen for any app that merely has the package installed, even without calling it.
Suggested fix: an Android JSI implementation mirroring the iOS one (I may attempt this), or, until then, a clear "iOS only" note in the README plus the autolinking exclusion below so Android builds don't break on install.
## Reproducible Demo
1. Add `@callstack/react-native-draco` to any RN 0.86 new-arch Android app and build — codegen fails on `NativeDracoSpec`.
2. Or just read `android/src/main/java/com/draco/DracoModule.kt`: the only implemented method is `multiply(a, b)`, so decode is a no-op on Android.
Workaround we ship — exclude it from Android autolinking so models fail with a JS error instead of breaking the build:
// react-native.config.js
module.exports = {
dependencies: {
'@callstack/react-native-draco': { platforms: { android: null } },
},
};
> Transparency note: this issue was drafted with AI assistance. I'm a human, I've personally verified the bug and the workaround, and I'm happy to answer any questions or concerns directly. Thanks for the library.
Beitragsleitfaden
Rechercherichtung
Beginne mit android/src/main/java/com/draco/DracoModule.kt und vergleiche dessen Template-Methode mit den implementierten Pfaden unter cpp/ und ios/. Reproduziere den Android-Buildfehler der React Native 0.86 new-architecture und untersuche die NativeDracoSpec-Codegen-Konfiguration. Kläre vor dem Fortfahren, ob der Umfang die Android-Dekodierung, eine ausschließlich iOS-bezogene Dokumentations-/Workaround-Änderung oder beides umfasst; als erledigt gilt dies, wenn der ausgewählte Umfang auf Android verifiziert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, cpp, kotlin, react-native
- Bereich
- build-system, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100