eas build fail in Run gradlew

Hello,
I am trying to build a custom development client but I am getting an error in Run gradlew same thing with npx expo run:android the build fail I tried a lot of solution I found on the internet but nothing work so I hope I can find the answer here
this is the login terminal:

šŸ¤– Android build failed:
Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

this is the full error log:

> Task :app:dexBuilderDebug
> Task :app:mergeDebugJavaResource
> Task :expo-modules-core:prepareBoost
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
540 actionable tasks: 540 executed
[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:mergeLibDexDebug'.
[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]            Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
[stderr]            Type com.bumptech.glide.GeneratedAppGlideModuleImpl is defined multiple times: /home/expo/workingdir/build/node_modules/react-native-fast-image/android/build/.transforms/8485071c78dff0abed4a3b931866670b/transformed/classes/classes.dex, /home/expo/workingdir/build/node_modules/expo-image/android/build/.transforms/e9cf1b24da03614611457bfd0fa1835b/transformed/classes/classes.dex
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] 2: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] java.lang.StackOverflowError (no error message)
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 5m 57s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

also this is the error for npx expo run:android

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
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.bumptech.glide.GeneratedAppGlideModuleImpl is defined multiple times: E:\WorkSpace\Projects\React Native\elazan\node_modules\react-native-fast-image\android\build\.transforms\61a2dc3987f9871d3192ff0231abdd0e\transformed\classes\classes.dex, E:\WorkSpace\Projects\React Native\elazan\node_modules\expo-image\android\build\.transforms\8bd1747da24c2482c4a1d5c764b71a8a\transformed\classes\classes.dex

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

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

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

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

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

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD FAILED in 27s
498 actionable tasks: 14 executed, 3 from cache, 481 up-to-date
Error: E:\WorkSpace\Projects\React Native\elazan\android\gradlew.bat exited with non-zero code: 1
Error: E:\WorkSpace\Projects\React Native\elazan\android\gradlew.bat exited with non-zero code: 1
    at ChildProcess.completionListener (E:\WorkSpace\Projects\React Native\elazan\node_modules\@expo\spawn-async\build\spawnAsync.js:52:23)
    at Object.onceWrapper (node:events:646:26)
    at ChildProcess.emit (node:events:526:28)
    at ChildProcess.cp.emit (E:\WorkSpace\Projects\React Native\elazan\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
    ...
    at spawnGradleAsync (E:\WorkSpace\Projects\React Native\elazan\node_modules\@expo\cli\build\src\start\platforms\android\gradle.js:72:46)
    at Object.assembleAsync (E:\WorkSpace\Projects\React Native\elazan\node_modules\@expo\cli\build\src\start\platforms\android\gradle.js:52:18)
    at runAndroidAsync (E:\WorkSpace\Projects\React Native\elazan\node_modules\@expo\cli\build\src\run\android\runAndroidAsync.js:31:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
  • eas version: eas-cli/3.3.2 win32-x64 node-v16.14.2

Hi @osmx

Try running expo-cli doctor --fix-dependencies

this is the message i got šŸŽ‰ Didn't find any issues with the project!

The problem was expo-image everything was solved after I uninstalled it