callstack / callstack/react-native-draco

Android module is the create-react-native-library stub — Draco decode is unimplemented on Android

Đang mở
#4 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
10
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with android/src/main/java/com/draco/DracoModule.kt and compare its template method with the implemented paths under cpp/ and ios/. Reproduce the React Native 0.86 new-architecture Android build failure and inspect the NativeDracoSpec codegen configuration. Before proceeding, establish whether the scope is Android decoding, an iOS-only documentation/workaround change, or both; done means the selected scope is verified on Android.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, cpp, kotlin, react-native
Lĩnh vực
build-system, mobile
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.