Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Nitro module library crash on android example build

Abierto
#896 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
android, javascript, react-native

Línea de trabajo

Comienza con el repro generado y example/package.json; después ejecuta yarn example android para reproducir el error de dex duplicado. Compara las compilaciones de los módulos Nitro y Turbo, centrándote en el registro de react-native-safe-area-context. Se considera terminado cuando el ejemplo generado por Nitro se compila correctamente sin clases duplicadas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
Description

After generating new library using npx create-react-native-library@latest awesome-librar and selecting "Nitro module" option, installing packages with yarn, and running yarn example android, I encountered an error.
It looks like unused react-native-safe-area-context dependency from example app is getting registered multiple times.

Execution failed for task ':app:mergeLibDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
   > There was a failure while executing work items
      > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
         > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
           Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
           Type com.facebook.react.viewmanagers.RNCSafeAreaProviderManagerDelegate is defined multiple times: /Users/john/Desktop/awesome-library/android/build/.transforms/9286b72b4f9552335ae00fc4394f0219/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/RNCSafeAreaProviderManagerDelegate.dex, /Users/john/Desktop/awesome-library/example/node_modules/react-native-safe-area-context/android/build/.transforms/def7637fb683de95fb0b5f690e7a6ad7/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/RNCSafeAreaProviderManagerDelegate.dex

I tried to find the duplicate, but the only place where it's declared is in example/package.json:

yarn why react-native-safe-area-context
└─ awesome-library-example@workspace:
└─ react-native-safe-area-context@npm:5.6.1 [fb98e] (via npm:^5.5.2 [fb98e])

Creating library with Turbo module does not result in the same error, even though react-native-safe-area-context is also present there.

Packages
  • create-react-native-library
  • react-native-builder-bob
Selected options
Image
Link to repro

https://github.com/jaworek/awesome-library

Environment

System:
OS: macOS 26.0
CPU: (11) arm64 Apple M3 Pro
Memory: 393.58 MB / 36.00 GB
Shell:
version: 5.3.3
path: /nix/store/j26b6rcrvvpvqqcq5gmzxxipjb8ycy09-bash-interactive-5.3p3/bin/bash
Binaries:
Node:
version: 20.19.4
path: /opt/homebrew/bin/node
Yarn:
version: 3.6.1
path: /nix/store/38vyy0sbiqaq3r5liws3yfhxlhgcwsyz-yarn-berry-3.8.7/bin/yarn
npm:
version: 10.8.2
path: /opt/homebrew/bin/npm
Watchman:
version: 2025.09.15.00
path: /etc/profiles/per-user/john/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /etc/profiles/per-user/john/bin/pod
SDKs:
iOS SDK: Not Found
Android SDK:
API Levels:
- "33"
- "35"
- "36"
Build Tools:
- 33.0.1
- 34.0.0
- 35.0.0
- 36.0.0
System Images:
- android-33 | Android TV ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.26094.121.2513.14007798
Xcode:
version: /undefined
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /etc/profiles/per-user/john/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.0
wanted: 20.0.0
react:
installed: 19.1.0
wanted: 19.1.0
react-native:
installed: 0.81.1
wanted: 0.81.1
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: false

Lenguaje dominante
JavaScript
Estrellas
3.2k
Forks
228
Merge medio
16 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstack/react-native-builder-bob

Todos los issues de callstack/react-native-builder-bob

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.