android builds fails due to duplicate class with react-native-random-uuid
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, javascript, react-native
- Lĩnh vực
- build-system, mobile
Hướng nghiên cứu
Tái hiện bản build Android với cả react-native-get-random-values và react-native-random-uuid được cài đặt, bắt đầu từ lỗi mergeLibDexDevelopmentDebug. Kiểm tra hai đầu ra build Android để tìm định nghĩa trùng lặp của org.linusu.BuildConfig; được xem là hoàn tất khi nguyên nhân và một kết quả tương thích cho cả hai thư viện đã được xác định, đồng thời kiểm tra iOS riêng nếu có liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Swift
- Star
- 417
- Fork
- 64
- Merge trung bình
- 25 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của LinusU/react-native-get-random-values
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
LinusU/react-native-get-random-values#68 · 1 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 32/100
LinusU/react-native-get-random-values#22 · 4 bình luận · 11 reaction ·
-
Add support for WindowsĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
LinusU/react-native-get-random-values#3 · 3 bình luận · 7 reaction ·
Tất cả issue của LinusU/react-native-get-random-values
Issue tương tự
-
🎉 Add PandaPalĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
jaywcjlove/awesome-mac#4192 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
@-mention suggestions don't match a display name typed without its spaces (Element Web does)Có thể đã có người làm @dwong716 đã nhận hôm nay. Đang mởT-Defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
element-hq/element-x-ios#6457 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
manaflow-ai/cmux#32617 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-ready area:testing bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
pauljohanneskraft/Acai#479 ·
Maintainer thường phản hồi trong vòng 3 ngày