expo: EAS Build Android / Fatal error
Summary
Hi,
Just upgraded from expo 44 to 45 and I can’t build with EAS on android anymore.
Here’s the stack trace :
Running './gradlew :app:assembleRelease' in /home/expo/workingdir/build/android
2
Downloading https://services.gradle.org/distributions/gradle-7.3.3-all.zip
3
10%.
4
20%.
5
30%.
6
40%.
7
50%.
8
60%.
9
70%.
10
80%
11
90%.
12
100%
13
Welcome to Gradle 7.3.3!
14
Here are the highlights of this release:
15
- Easily declare new test suites in Java projects
16
- Support for Java 17
17
- Support for Scala 3
18
For more details see https://docs.gradle.org/7.3.3/release-notes.html
19
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.
20
Daemon will be stopped at the end of the build
21
Unable to list file systems to check whether they can be watched. Assuming all file systems can be watched. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)
22
[stderr] FAILURE: Build failed with an exception.
23
[stderr] * Where:
24
[stderr] Script '/home/expo/workingdir/build/node_modules/expo/scripts/autolinking.gradle' line: 2
25
[stderr] * What went wrong:
26
[stderr] A problem occurred evaluating script.
27
[stderr] > Could not read script '/' as it is a directory.
28
[stderr] * Try:
29
[stderr] > Run with --stacktrace option to get the stack trace.
30
[stderr] > Run with --info or --debug option to get more log output.
31
[stderr] > Run with --scan to get full insights.
32
[stderr] * Get more help at https://help.gradle.org
33
[stderr] BUILD FAILED in 14s
34
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)
35
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
45
Environment
System:
OS: macOS 12.3.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.18 - ~/.nvm/versions/node/v16.13.1/bin/yarn
npm: 8.3.0 - ~/.nvm/versions/node/v16.13.1/bin/npm
Managers:
CocoaPods: 1.11.2 - /Users/yonitouboul/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 13.4/13F17a - /usr/bin/xcodebuild
npmPackages:
babel-preset-expo: ~9.1.0 => 9.1.0
expo: ^45.0.0 => 45.0.4
react: 17.0.2 => 17.0.2
react-dom: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
npmGlobalPackages:
eas-cli: 0.53.0
expo-cli: 5.4.7
Expo Workflow: managed```
### Reproducible demo
Upgrade to SDK 45.
Run `eas build --profile preview -p android`
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20
Found a solution to this!
expo upgrade
to the same SDK (45).Same problem here. Working with Expo Build runs fine on iOS. But on Android, at “Run gradlew”, I get :
Running ‘gradlew :app:bundleRelease’ 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
##############################
Using react.gradle in your project is deprecated! You should move to “apply plugin: com.facebook.react”
react.gradle is going to be removed in a future React Native project and your project will not build anymore.
You can use the template as a reference:
https://github.com/facebook/react-native/blob/main/template/android/app/build.gradle
##############################
ℹ️ Applying gradle plugin ‘expo-updates-gradle-plugin’ (expo-updates@0.18.5)
Stop expo-updates app.manifest generation because ReactExtension is not registered
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.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.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.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.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.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.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.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.Checking the license for package CMake 3.22.1 in /home/expo/Android/Sdk/licenses
License for package CMake 3.22.1 accepted.
Preparing “Install CMake 3.22.1 (revision: 3.22.1)”.
“Install CMake 3.22.1 (revision: 3.22.1)” ready.
Installing CMake 3.22.1 in /home/expo/Android/Sdk/cmake/3.22.1
“Install CMake 3.22.1 (revision: 3.22.1)” complete.
“Install CMake 3.22.1 (revision: 3.22.1)” finished.
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.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.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.10 actionable tasks: 10 executed
[stderr] FAILURE: Build completed with 2 failures.
[stderr] 1: Task failed with an exception.
[stderr]
[stderr]
[stderr] Build file ‘/home/expo/workingdir/build/node_modules/expo-updates/android/build.gradle’ line: 78
[stderr]
[stderr] A problem occurred evaluating project ‘:expo-updates’.
[stderr]
[stderr]
[stderr]
[stderr]
[stderr]
[stderr]
[stderr] 2: Task failed with an exception.
[stderr]
[stderr]
[stderr] A problem occurred configuring project ‘:expo’.
[stderr]
[stderr]
[stderr]
[stderr]
[stderr]
[stderr]
[stderr]
[stderr] BUILD FAILED in 2m 11s
Error: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.
// --------------
I have removed and installed expo-updates, nothing changes. I use expo SDK 48.
Any clue ? THanks !
In my case, I need to remove packages that dependents on @unimodules/core and @unimodules/react-native-adapter package (these are deprecated expo packages) and runs the
expo upgrade
command.So i guess we need to remove any deprecated package(s) (directly or transitive) from expo and then run that command.