Skip to content

Build Failure on Android - React Native v.79.1 and Expo@53.0.1 - Duplicate class error #704

@ChristopherGabba

Description

@ChristopherGabba

Details:

  • Android only (iOS works fine)
  • react-native@0.79.1
  • expo@53.0.1
  • new architecture
  • react-native-builder-bob monorepo style setup
  • install this package in my example app

Steps to reproduce:
npx expo prebuild --clean --platform android

npx expo:run android

The app will not compile gives a duplicate class error here:

xecution 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.RNCSliderManagerDelegate is defined multiple times: /Users/christophergabba/Documents/react-native-audio-manager/android/build/.transforms/ea416fd6a2ec98d64481b8e85d8c7291/transformed/classes/classes_dex/classes.dex, /Users/christophergabba/Documents/react-native-audio-manager/example/node_modules/@react-native-community/slider/android/build/.transforms/758b1cb35986a636d81dd8641e958162/transformed/classes/classes_dex/classes.dex

M

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug reportSomething isn't workingnew architectureIssue relates to react-native new architectureplatform: AndroidIssue related to Android platformrequires: author feedbackItem requires some author's action

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions