[SDK45] EAS failed at run gradlew

EAS failed at run gradlew phase.

Run gradlew log

Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/SpindleApp/android
Downloading https://services.gradle.org/distributions/gradle-7.3.3-all.zip
10
%.
20%.
30%.
40%.
50%.
60%.
70%.
80%.
90%.
100%
Welcome to Gradle 7.3.3!
Here are the highlights of this release:
 - Easily declare new test suites in Java projects
 - Support for Java 17
- Support for Scala 3
For more details see https://docs.gradle.org/7.3.3/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.3.3/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Settings file '/home/expo/workingdir/build/SpindleApp/android/settings.gradle' line: 10
[stderr] * What went wrong:
[stderr] A problem occurred evaluating settings 'Spindle'.
[stderr] > path may not be null or empty string. path='null'
[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
[stderr] to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 20s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

To investigate, run expo prebuild --no-install --platform android and here is settings.gradle file. I have no idea why an error occured around line 10.

rootProject.name = 'Spindle'

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle");
useExpoModules()

apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesSettingsGradle(settings)

include ':app'
includeBuild(new File(["node", "--print", "require.resolve('react-native-gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile())

if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
  include(":ReactAndroid")
  project(":ReactAndroid").projectDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../ReactAndroid");
}

Thanks in advance!

Resolved by myself. Create a new project by npx create-expo-app and apply my stuff, the issue is gone.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.