android builds fails due to duplicate class with react-native-random-uuid
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- android, javascript, react-native
- Área
- build-system, mobile
Línea de trabajo
Reproduce la compilación de Android con react-native-get-random-values y react-native-random-uuid instalados, comenzando por el fallo mergeLibDexDevelopmentDebug. Inspecciona las dos salidas de compilación de Android en busca de la definición duplicada de org.linusu.BuildConfig; se considera terminado cuando se hayan establecido la causa y un resultado compatible para ambas bibliotecas, comprobando iOS por separado si es relevante.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
ive been looking into generating random values in react-native. i found this library at first and used it together with the uuid library. i then saw this issue: https://github.com/LinusU/react-native-get-random-values/issues/32
where someone suggested to add crypto.randomUUID() too. to keep the library clean, you made a new library: https://github.com/LinusU/react-native-random-uuid
i then installed that library to try it as well. then when i build the android app the build fails and i get an error like this:
* What went wrong:
Execution failed for task ':app:mergeLibDexDevelopmentDebug'.
> 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:
Type org.linusu.BuildConfig is defined multiple times: /Users/adb/dev/APP_NAME/node_modules/react-native-get-random-values/android/build/.transforms/aa2fd757f1fb328047e3f797775fb731/transformed/classes/classes.dex, /Users/adb/dev/APP_NAME/node_modules/react-native-random-uuid/android/build/.transforms/ce3394d28852a5322f9e5e76c2b08d87/transformed/classes/classes.dex
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
with a link to: https://developer.android.com/build/dependencies?buildsystem=ndk-build#duplicate_classes
i think the problem lies here:
Type org.linusu.BuildConfig is defined multiple times
i dont know if this value can even be changed. i know some package names cannot be changed after they have been released.
this may not be a problem realistically, as there may not be a reason to have both libraries installed at the same time. i was just experimenting to see how they worked.
the build was also successful as soon as a deleted react-native-get-random-values.
also as a sidenote, im not sure if this is also the case for ios. i currently have some unrelated problems with some ios pods which means i cant even install pods successfully. maybe someone else can test it out to see if it also happens on ios.
- Lenguaje dominante
- Swift
- Estrellas
- 417
- Forks
- 64
- Merge medio
- 25 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de LinusU/react-native-get-random-values
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
LinusU/react-native-get-random-values#68 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 32/100
LinusU/react-native-get-random-values#22 · 4 comentarios · 11 reacciones ·
-
Add support for WindowsAbiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
LinusU/react-native-get-random-values#3 · 3 comentarios · 7 reacciones ·
Todos los issues de LinusU/react-native-get-random-values
Issues similares
-
area: agents area: layout S3: minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
manaflow-ai/cmux#34277 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug core p3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
RunanywhereAI/runanywhere-sdks#1258 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
googleapis/google-cloud-swift#1581 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Starmel/OpenSuperWhisper#232 ·