android builds fails due to duplicate class with react-native-random-uuid
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- android, javascript, react-native
- 領域
- build-system, mobile
調査の方向性
react-native-get-random-values と react-native-random-uuid の両方をインストールした状態で Android ビルドを再現し、まず mergeLibDexDevelopmentDebug の失敗から始めます。2 つの Android ビルド出力を調べ、org.linusu.BuildConfig の重複定義を確認します。原因と両方のライブラリに互換性のある結果が確立されれば完了です。関連する場合は iOS も別途確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Swift
- スター
- 417
- フォーク
- 64
- 平均マージ
- 25分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LinusU/react-native-get-random-values のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
LinusU/react-native-get-random-values#68 · コメント 1 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 32/100
LinusU/react-native-get-random-values#22 · コメント 4 件 · リアクション 11 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
LinusU/react-native-get-random-values#3 · コメント 3 件 · リアクション 7 件 ·
LinusU/react-native-get-random-values の issue をすべて見る
似ている issue
-
🎉 Add PandaPalオープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
jaywcjlove/awesome-mac#4192 ·
メンテナーはふだん 1 日以内に返信
-
@-mention suggestions don't match a display name typed without its spaces (Element Web does)対応中かも @dwong716 が今日担当しました。 オープンT-Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
element-hq/element-x-ios#6457 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
manaflow-ai/cmux#32617 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
skiptools/skip-fuse-ui#166 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
runjuu/InputSourcePro#153 · コメント 1 件 ·