I am in the process of upgrading my app from Expo 49 to 50 and have encountered an issue when creating builds. While the iOS builds are generated successfully, the Android build fails during the Run Gradlew step. Running expo doctor shows no dependency issues. Below is the console error from the Expo.dev console during the build process. Please let me know if I need provide any more context.
Running 'gradlew :app:assembleDebug' in /home/expo/workingdir/build/android
Welcome to Gradle 8.3!
Here are the highlights of this release:
- Faster Java compilation
- Reduced memory usage
- Support for running on Java 20
For more details see https://docs.gradle.org/8.3/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.3/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
> Configure project :
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
> Task :expo-updates-gradle-plugin:pluginDescriptors
> Task :expo-updates-gradle-plugin:processResources
> Task :gradle-plugin:pluginDescriptors
> Task :expo-dev-launcher-gradle-plugin:pluginDescriptors
> Task :expo-dev-launcher-gradle-plugin:processResources
> Task :gradle-plugin:processResources
> Task :expo-dev-launcher-gradle-plugin:compileKotlin
> Task :expo-dev-launcher-gradle-plugin:compileJava
NO-SOURCE
> Task :expo-dev-launcher-gradle-plugin:classes
> Task :expo-dev-launcher-gradle-plugin:jar
> Task :expo-dev-launcher-gradle-plugin:inspectClassesForKotlinIC
> Task :gradle-plugin:compileKotlin
> Task :gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:classes
> Task :gradle-plugin:jar
> Task :gradle-plugin:inspectClassesForKotlinIC
> Task :expo-updates-gradle-plugin:compileKotlin
> Task :expo-updates-gradle-plugin:compileJava NO-SOURCE
> Task :expo-updates-gradle-plugin:classes
> Task :expo-updates-gradle-plugin:jar
> Task :expo-updates-gradle-plugin:inspectClassesForKotlinIC
> Configure project :app
ℹ️ e[33mApplying gradle plugine[0m 'e[32mexpo-dev-launcher-gradle-plugine[0m' (expo-dev-launcher@3.6.10)
ℹ️ e[33mApplying gradle plugine[0m 'e[32mexpo-updates-gradle-plugine[0m' (expo-updates@0.24.13)
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/home/expo/workingdir/build/node_modules/expo-application/android/build.gradle' line: 10
* What went wrong:
A problem occurred evaluating project ':expo-application'.
> Could not find method useDefaultAndroidSdkVersions() for arguments [] on project ':expo-application' of type org.gradle.api.Project.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* Where:
Script '/home/expo/workingdir/build/node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle' line: 65
* What went wrong:
A problem occurred configuring project ':expo'.
> Could not get unknown property 'release' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
* 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.
==============================================================================
BUILD FAILED in 2m 38s
15 actionable tasks: 15 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.