In order to add OTA updates functionality, I installed expo-updates package and before that I configured expo-modules@latest in my react native bare project. Everything worked fine, build successfully, but when I execute the command eas build -p android --profile preview, it crashes/build-fails after 6 mins due to the following error:
[stderr] FAILURE: Build completed with 2 failures.
[stderr] 1: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-updates:compileReleaseKotlin'.
[stderr] > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
[stderr] > Compilation error. See log for more details
[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] java.lang.StackOverflowError (no error message)
[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 4m 53s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Same issue for me as well. Yesterday everything worked fine but today the build is failing. To my knowledge nothing has changed in my code since yesterday so hopefully this gets resolved soon.
Same issue here. Builds were fine yesterday, today they are failing with the same error. I removed expo-updates and updated react-native-screens, which seems to have fixed it.
I made my react native application using expo, a to do list app, I finished it and continued to make the apk with “expo build: android” so far everything was correct, no errors and I was able to generate my apk. The problem is that when I want to start my app on my device it tells me that the app has stopped and closes instantly, I can only see the splash. I can’t find the error and I don’t know what it could be, I looked for more ways to make the apk but it ends up giving me the same error, my app appears perfectly in the emulator, the problem is when I use it on my device.
i.e. if you have no android directory in your app, just rebuild. If you do have an android directory, then either regenerate it with npx expo prebuild --clean or manually make the changes to android/build.gradle.
@viniciuslima7 this is an old issue that happened when the React Native team released React Native 0.71-rc in October 2022 which had an impact on other releases of React Native. They then fixed the issue.
Whatever build issue you are experiencing will not be this issue and you should create a new thread with the relevant details and a link to one of your failing builds.