Error in exporting the app (eas cli build)

The problem is that when I put in the cmd “eas build -p android --profile preview” and when it is about to finish, it sends an error, I already updated eas cli, expo, I also put “npm install” “expo doctor - -fix-dependencies” and then “eas build -p android --profile preview” again, but it still gives me errors.

Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-7.5.1-all.zip
10
%.
20%.
30%.
40%
50%.
60%
70%
80
%.
90%
100%
Welcome to Gradle 7.5.1!
Here are the highlights of this release:
 - Support for Java 18
 - Support for building with Groovy 4
 - Much more responsive continuous builds
 - Improved diagnostics for dependency resolution
For more details see https://docs.gradle.org/7.5.1/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
> Task :react-native-gradle-plugin:pluginDescriptors
> Task :react-native-gradle-plugin:processResources
> Task :react-native-gradle-plugin:compileKotlin
> Task :react-native-gradle-plugin:compileJava NO-SOURCE
> Task :react-native-gradle-plugin:classes
> Task :react-native-gradle-plugin:inspectClassesForKotlinIC
> Task :react-native-gradle-plugin:jar
> Configure project :expo-app-auth
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-application
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-constants
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-file-system
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-font
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-keep-awake
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
> Configure project :expo-linear-gradient
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
[stderr] 
FAILURE: Build completed with 2 failures.
[stderr] 
1: Task failed with an exception.
[stderr] 
-----------
[stderr] 
* Where:
[stderr] 
Build file '/home/expo/workingdir/build/node_modules/expo-modules-core/android/build.gradle' line: 3
[stderr] 
* What went wrong:
[stderr] 
A problem occurred evaluating project ':expo-modules-core'.
[stderr] 
> Plugin with id 'maven' not found.
[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] 
A problem occurred configuring project ':expo'.
[stderr] 
> compileSdkVersion is not specified. Please add it to build.gradle
[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 1m 45s
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
5 actionable tasks: 5 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Hi, could you send me an output from the expo doctor command or give me a link to your build?

npx expo-doctor: WARNING: We recommend using PowerShell or Bash via WSL 2 for development with Expo CLI on Windows. You may encounter issues using cmd.exe.

:heavy_check_mark: Check package.json for common issues
:heavy_check_mark: Validate global prerequisites versions
:heavy_check_mark: Validate Expo Config
:heavy_check_mark: Check for incompatible packages
:heavy_check_mark: Check for conflicting global packages in project
:heavy_check_mark: Verify prebuild support package versions are compatible
:heavy_multiplication_x: Check compatible dependency versions for the installed Expo SDK

Detailed check results:

Some dependencies are incompatible with the installed expo version:
react-native@0.71.3 - expected version: 0.71.8
Your project may not work correctly until you install the correct versions of the packages.
Install individual packages by running npx expo install react-native@0.71.8
Found outdated dependencies
Advice: Use ‘npx expo install --check’ to review and upgrade your dependencies.

One or more checks failed, indicating possible issues with the project.

Did you try running npx expo install react-native@0.71.8?

Oh, looking at the install dependencies phase of your build I think that you have mixed package managers in your project. You have both yarn.lock and package-lock.json in your project which might be the root of an issue for you. Try to stick to only one package manager of your choice, by removing package-lock.json or yarn.lock.

1 Like