Skip to content

Expo template build fails (drawer-navigation)  #913

Open
@lcundiff

Description

@lcundiff

Describe the bug
Android build fails for drawer-navigation expo template with this error: Execution failed for task ':app:mergeDexRelease'. More error info in context section. However, I was able to successfully build the default app template. So I don't believe it is due to my system. Is there an expo version requirement for this template above 45? I have not edited any file, merely downloaded and built.

To Reproduce
Steps to reproduce the behavior:

  1. Run npx create-react-native-app
  2. Give app name and choose expo template
  3. Scroll down to drawer-navigation template and select it
  4. Allow it to finish installing and cd into app folder
  5. Run npm i
  6. Run eas build -p android

Expected behavior
Build should succeed.

Desktop:

  • OS: iOS
  • Browser N/A
  • Expo Version: 45
  • Eas-cli: 2.8.0

Additional context
Build error occurs with "Task :app:mergeDexRelease"

Task :app:mergeDexRelease FAILED
[stderr] ERROR:/home/expo/workingdir/build/node_modules/@react-native-community/masked-view/android/build/.transforms/53358cd9a1a26d387439d2f81db3c114/transformed/classes/classes.dex: D8: Type org.reactnative.maskedview.BuildConfig is defined multiple times: /home/expo/workingdir/build/node_modules/@react-native-community/masked-view/android/build/.transforms/53358cd9a1a26d387439d2f81db3c114/transformed/classes/classes.dex, /home/expo/workingdir/build/node_modules/@react-native-masked-view/masked-view/android/build/.transforms/277d621c3eeec8cb26e62f414fafa4e8/transformed/classes/classes.dex

Final error log:

[stderr] FAILURE: Build completed with 2 failures.

[stderr] 1: Task failed with an exception.

[stderr] -----------

[stderr] * What went wrong:

[stderr] Execution failed for task ':app:mergeDexRelease'.

[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate

[stderr]    > There was a failure while executing work items

[stderr]       > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction

[stderr]          > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 

[stderr]            Type org.reactnative.maskedview.BuildConfig is defined multiple times: /home/expo/workingdir/build/node_modules/@react-native-community/masked-view/android/build/.transforms/53358cd9a1a26d387439d2f81db3c114/transformed/classes/classes.dex, /home/expo/workingdir/build/node_modules/@react-native-masked-view/masked-view/android/build/.transforms/277d621c3eeec8cb26e62f414fafa4e8/transformed/classes/classes.dex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions