Eas build failed

Hello developers, my build is faled with eas build

my package.json

{
“name”: “matrive-v2”,
“version”: “1.0.0”,
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“web”: “expo start --web”
},
“dependencies”: {
@babel/preset-typescript”: “^7.18.6”,
@expo/vector-icons”: “^13.0.0”,
@react-native-community/blur”: “^4.2.0”,
@react-native-community/datetimepicker”: “^6.2.0”,
@react-native-community/masked-view”: “^0.1.11”,
@react-native-community/netinfo”: “^9.3.0”,
@react-native-masked-view/masked-view”: “^0.2.7”,
@react-navigation/drawer”: “^6.4.4”,
@react-navigation/native”: “^6.0.12”,
@react-navigation/native-stack”: “^6.8.0”,
@react-navigation/stack”: “^6.2.3”,
@shopify/flash-list”: “1.1.0”,
“babel-plugin-transform-typescript-metadata”: “^0.3.2”,
“class-transformer”: “^0.5.1”,
“class-validator”: “^0.13.2”,
“expo”: “~46.0.9”,
“expo-device”: “^4.3.0”,
“expo-notifications”: “~0.16.1”,
“expo-splash-screen”: “^0.16.2”,
“expo-sqlite”: “^10.3.0”,
“expo-status-bar”: “~1.4.0”,
“install”: “^0.13.0”,
“native-base”: “^3.4.13”,
“npm”: “^8.18.0”,
“react”: “18.0.0”,
“react-class-validator”: “^1.4.0”,
“react-dom”: “18.0.0”,
“react-native”: “0.69.5”,
“react-native-drawer”: “^2.5.1”,
“react-native-dropdown-picker”: “^5.4.2”,
“react-native-fab”: “^1.0.18”,
“react-native-flash-message”: “^0.3.1”,
“react-native-floating-action”: “^1.22.0”,
“react-native-gesture-handler”: “~2.5.0”,
“react-native-get-random-values”: “^1.8.0”,
“react-native-modal”: “^13.0.1”,
“react-native-modalize”: “^2.1.1”,
“react-native-multi-selectbox”: “^1.5.0”,
“react-native-multi-selectbox-typescript”: “^0.1.2”,
“react-native-pager-view”: “^5.4.24”,
“react-native-portalize”: “^1.0.7”,
“react-native-reanimated”: “~2.9.1”,
“react-native-safe-area-context”: “4.3.1”,
“react-native-screens”: “~3.15.0”,
“react-native-svg”: “12.3.0”,
“react-native-swiper”: “^1.6.0”,
“react-native-tab-view”: “^3.1.1”,
“react-native-web”: “~0.18.7”,
“react-redux”: “^8.0.2”,
“redux”: “^4.2.0”,
“reflect-metadata”: “^0.1.13”,
“typeorm”: “^0.3.9”,
“uuid”: “^8.3.2”,
“expo-dev-client”: “~1.2.1”
},
“devDependencies”: {
@babel/core”: “^7.12.9”,
@babel/plugin-proposal-export-namespace-from”: “^7.18.9”,
@types/node”: “^18.7.14”,
@types/react”: “~18.0.14”,
@types/react-native”: “~0.69.1”,
“typescript”: “~4.3.5”
},
“private”: true
}

[stderr]

gradle log

OperationRunner.java:199)

2714[stderr]

	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)

2715[stderr]

	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)

2716[stderr]

	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)

2717[stderr]

	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)

2718[stderr]

	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)

2719[stderr]

	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)

2720[stderr]

	at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)

2721[stderr]

	at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59)

2722

w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

2723

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

2724

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

2725

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings

2726

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.

2727

Please consult deprecation warnings for more details.

2728

981 actionable tasks: 981 executed

2729

Unable to list file systems to check whether they can be watched. The whole state of the virtual file system has been discarded. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)

2730[stderr]

at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:206)

2731[stderr]

	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

2732[stderr]

	at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:214)

2733[stderr]

	at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)

2734[stderr]

	at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)

2735[stderr]

	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

2736[stderr]

	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

2737[stderr]

	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)

2738[stderr]

	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)

2739[stderr]

	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

2740[stderr]

	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

2741[stderr]

	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)

2742[stderr]

	at java.base/java.lang.Thread.run(Thread.java:829)

2743[stderr]

Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /home/expo/workingdir/build/node_modules/@react-native-community/masked-view/android/build/.transforms/91a659309cac686fa038fdbe7d658b2e/transformed/classes/classes.dex

2744[stderr]

	at Version.fakeStackEntry(Version_3.1.51.java:0)

2745[stderr]

	at com.android.tools.r8.internal.oO0.a(SourceFile:68)

2746[stderr]

	at com.android.tools.r8.internal.oO0.a(SourceFile:28)

2747[stderr]

	at com.android.tools.r8.internal.oO0.a(SourceFile:27)

2748[stderr]

	at com.android.tools.r8.internal.oO0.b(SourceFile:3)

2749[stderr]

	at com.android.tools.r8.D8.run(D8.java:11)

2750[stderr]

	at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:136)

2751[stderr]

	... 33 more

2752[stderr]

Caused by: com.android.tools.r8.internal.b: Type org.reactnative.maskedview.BuildConfig is defined multiple times: /home/expo/workingdir/build/node_modules/@react-native-community/masked-view/android/build/.transforms/91a659309cac686fa038fdbe7d658b2e/transformed/classes/classes.dex, /home/expo/workingdir/build/node_modules/@react-native-masked-view/masked-view/android/build/.transforms/b8c5f03214e9b15cd1932f47cf8aca0e/transformed/classes/classes.dex

2753[stderr]

	at com.android.tools.r8.internal.il1.a(SourceFile:14)

2754[stderr]

	at com.android.tools.r8.internal.il1.a(SourceFile:22)

2755[stderr]

	at com.android.tools.r8.internal.lf1.b(SourceFile:6)

2756[stderr]

	at com.android.tools.r8.internal.lf1.a(SourceFile:23)

2757[stderr]

	at com.android.tools.r8.internal.lf1.a(SourceFile:10)

2758[stderr]

	at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048)

2759[stderr]

	at com.android.tools.r8.internal.lf1.a(SourceFile:6)

2760[stderr]

	at com.android.tools.r8.graph.r2$a.f(SourceFile:4)

2761[stderr]

	at com.android.tools.r8.dex.b.a(SourceFile:96)

2762[stderr]

	at com.android.tools.r8.dex.b.a(SourceFile:21)

2763[stderr]

	at com.android.tools.r8.D8.a(D8.java:21)

2764[stderr]

	at com.android.tools.r8.D8.d(D8.java:11)

2765[stderr]

	at com.android.tools.r8.D8.b(D8.java:1)

2766[stderr]

	at com.android.tools.r8.internal.oO0.a(SourceFile:24)

2767[stderr]

	... 36 more

2768[stderr]

FAILURE: Build failed with an exception.

2769[stderr]

* What went wrong:

2770[stderr]

Execution failed for task ':app:mergeDexRelease'.

2771[stderr]

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

2772[stderr]

   > There was a failure while executing work items

2773[stderr]

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

2774[stderr]

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

2775[stderr]

           Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.

2776[stderr]

           Type org.reactnative.maskedview.BuildConfig is defined multiple times: /home/expo/workingdir/build/node_modules/@react-native-community/masked-view/android/build/.transforms/91a659309cac686fa038fdbe7d658b2e/transformed/classes/classes.dex, /home/expo/workingdir/build/node_modules/@react-native-masked-view/masked-view/android/build/.transforms/b8c5f03214e9b15cd1932f47cf8aca0e/transformed/classes/classes.dex

2777[stderr]

* Try:

2778[stderr]

> Run with --stacktrace option to get the stack trace.

2779[stderr]

> Run with --info or --debug option to get more log output.

2780[stderr]

> Run with --scan to get full insights.

2781[stderr]

* Get more help at https://help.gradle.org

2782[stderr]

BUILD FAILED in 11m 4s

2783

Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Hey @drabom123, your project is using two different versions of the same library @react-native-masked-view/masked-view (see the highlighted code above). You’ll have to uninstall one of the versions from your project and re-run the build again.

Thaks, it’s worked

1 Like