After running “eas build -p android --profile production”, I am getting the below error during the “Run gradlew” step.
Running './gradlew :app:assembleRelease' in /root/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-6.9-all.zip
Unzipping /root/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs/gradle-6.9-all.zip to /root/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs
Set executable permissions for: /root/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs/gradle-6.9/bin/gradle
Welcome to Gradle 6.9!
Here are the highlights of this release:
- This is a small backport release.
- Java 16 can be used to compile when used with Java toolchains
- Dynamic versions can be used within plugin declarations
- Native support for Apple Silicon processors
For more details see https://docs.gradle.org/6.9/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.9/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
> Configure project :expo-structured-headers
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
> Configure project :expo
Using expo modules
- expo-application (4.0.1)
- expo-av (10.2.0)
- expo-constants (13.0.0)
- expo-device (4.1.0)
- expo-error-recovery (3.0.4)
- expo-file-system (13.1.0)
- expo-font (10.0.4)
- expo-image-picker (12.0.1)
- expo-json-utils (0.2.0)
- expo-keep-awake (10.0.1)
- expo-linear-gradient (11.0.0)
- expo-manifests (0.2.2)
- expo-media-library (14.0.0)
- expo-modules-core (0.6.4)
- expo-notifications (0.14.0)
- expo-secure-store (11.1.0)
- expo-splash-screen (0.14.1)
- expo-structured-headers (2.1.0)
- expo-updates (0.11.3)
- react-native-reanimated (2.3.1)
[stderr] FAILURE:
[stderr] > Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
[stderr] > Could not resolve com.facebook.react:react-native:+.
[stderr] Required by:
[stderr] project :app
[stderr] project :app > project :react-native-community_netinfo
[stderr] project :app > project :expo
[stderr] project :app > project :react-native-gesture-handler
[stderr] project :app > project :react-native-reanimated
[stderr] project :app > project :react-native-safe-area-context
[stderr] project :app > project :react-native-screens
[stderr] project :app > project :expo > project :expo-modules-core
[stderr] project :app > project :expo > project :expo-splash-screen
[stderr] project :app > project :expo > project :expo-updates
[stderr] > Failed to list versions for com.facebook.react:react-native.
[stderr] > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
[stderr] > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
[stderr] > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 1m 32s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
[stderr] Build failed with an exception.
[stderr] * What went wrong:
[stderr] Could not determine the dependencies of task ':app:lintVitalRelease'.
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
Not sure what to try honestly. Thanks for any help.
A few hours later this still seems to be an issue:
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseAssets'.
[stderr] > Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
[stderr] > Could not resolve com.facebook.react:react-native:+.
[stderr] Required by:
[stderr] project :app
[stderr] project :app > project :react-native-async-storage_async-storage
[stderr] project :app > project :react-native-community_masked-view
[stderr] project :app > project :expo
[stderr] project :app > project :react-native-gesture-handler
[stderr] project :app > project :react-native-safe-area-context
[stderr] project :app > project :react-native-screens
[stderr] project :app > project :react-native-svg
[stderr] project :app > project :expo > project :expo-modules-core
[stderr] project :app > project :expo > project :expo-splash-screen
[stderr] project :app > project :expo > project :expo-updates
[stderr] > Failed to list versions for com.facebook.react:react-native.
[stderr] > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
[stderr] > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
[stderr] > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 3m 34s
Even the status page of bintray gives me 502 Bad Gateway
And meanwhile all status pages (Expo, Gradle…) are telling that all systems are operational, when this has continued for at least 4 hours now. Are these status pages updated manually or do they have some kind of automatic logic behind them?
I ran into build issues because of 502 errors when trying to fetch from jcenter today. I was able to work around it by using patch-package and a Config Plugin to remove jcenter() from my dependencies’ build.gradle files and also the build.gradle of the app itself.
Whether it will work for you probably depends on your dependencies.