Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail with duplicated class issue #3366

Open
DImuthuUpe opened this issue Jan 29, 2025 · 2 comments
Open

Fail with duplicated class issue #3366

DImuthuUpe opened this issue Jan 29, 2025 · 2 comments
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided

Comments

@DImuthuUpe
Copy link

Description

I installed react-native-gesture-handler 2.22.1 in my react native project and when I tred to start the android build, It fails consistently. I have the new arch enabled and react native version is 0.77.0

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.RNGestureHandlerButtonManagerDelegate is defined multiple times: /Users/dwannipu/code/react-native-pdfviewer/android/build/.transforms/66ff3a4427d7dca75c1953fd04ca2a01/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.dex, /Users/dwannipu/code/react-native-pdfviewer/example/node_modules/react-native-gesture-handler/android/build/.transforms/154b19f9fc21bf7fa37ffd0829a70161/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.dex * Try:

Steps to reproduce

git clone https://github.com/DImuthuUpe/react-native-pdfviewer/
cd react-native-pdfviewer
yarn install
yarn codegen
cd example
yarn install
yarn android

Snack or a link to a repository

https://github.com/DImuthuUpe/react-native-pdfviewer/

Gesture Handler version

2.22.1

React Native version

0.77.0

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided labels Jan 29, 2025
@remarkablemark
Copy link

remarkablemark commented Jan 29, 2025

I also encountered this issue with [email protected]. I had to downgrade to [email protected]. I'm using [email protected]. Looks like the latest version requires minimum [email protected]?

@DImuthuUpe
Copy link
Author

I have react native 0.77.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

2 participants