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.
I searched for hours related to this issue and found something similar here https://github.com/expo/expo/issues/19259#issuecomment-1259724391, applied the changes, and it is still throwing the same build everytime... Everything works in development though, no crashes there...
My env:
{
...,
"dependencies": {
"react": "18.1.0",
"react-native": "0.70.0",
"expo": "^46.0.0",
"expo-updates": "~0.14.6",
},
...
}
I am not able to create a build due to this error, if someone could help, I would really appreciate it!
Feel free to ask any more details if needed!
Related
Trying to deploy my react native project, got as far as putting eas build --platform android in the terminal and got this 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 ':app:bundleReleaseJsAndAssets'.
[stderr] > Process 'command 'node'' finished with non-zero exit value 1
[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.
I tried killing the terminal and trying again, making sure android studio is closed, and having been searching the web but to no avail. Thanks in advance!
I have got exception fron eas build -p android
:react-native-firebase_auth:reactNativeAndroidDir /home/expo/workingdir/build/node_modules/react-native/android
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Build file '/home/expo/workingdir/build/node_modules/react-native-permission/android/build.gradle' line: 14
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':react-native-permission'.
[stderr] > Could not find method compile() for arguments [com.facebook.react:react-native:0.20.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
[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] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 1m 52s
Please, help, yarn add react-native-peremission doesn't help
I am trying to migrate from classical builds to eas but the builds are failing due to some internal reason.
This happened with both bare and managed workflows,
Expo Cli version : 5.2.0
Expo SDK Version : 44.0.0
Here is the error log :
Task :react-native-webview:compileReleaseRenderscript NO-SOURCE
Task :react-native-webview:generateReleaseResValues
Task :react-native-webview:generateReleaseResources
Task :react-native-webview:packageReleaseResources
Task :unimodules-task-manager-interface:compileReleaseRenderscript NO-SOURCE
Task :unimodules-task-manager-interface:generateReleaseResValues
Task :unimodules-task-manager-interface:generateReleaseResources
Task :unimodules-task-manager-interface:packageReleaseResources
Task :app:mergeReleaseResources
Task :app:mergeReleaseResources FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ‘:app:mergeReleaseResources’.
[stderr] >
[stderr] A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr] > Android resource compilation failed
[stderr] /home/expo/workingdir/build/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:7078: AAPT: error: duplicate value for resource ‘attr/show_buffering’ with config ‘’.
[stderr]
[stderr] /home/expo/workingdir/build/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:7078: AAPT: error: resource previously defined here.
[stderr]
[stderr] /home/expo/workingdir/build/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml: AAPT: error: file failed to compile.
[stderr]
[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 5m 47s
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 Command-Line Interface
167 actionable tasks: 167 executed
Error: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.
Please advise.
I am trying to build an android apk of my react native app. I was trying two commands expo-cli build:android -t apk and expo build:android. But I am getting this error repeatedly. If anyone can give any clue about this error please do the help :')
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseResources'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr] > Android resource compilation failed
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/res/values/colors.xml:13:3-57: AAPT: error: invalid color.
[stderr]
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml: AAPT: error: file failed to compile.
[stderr]
[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 31s
I have attached a screenshot of the error I am getting. Please give a look.
Build failed with an exception.
I build expo app yesterday.
But I can't build expo app today (another app).
I don't update at all.
I search google but can't get any answer
exp build:android
this is expo app build log
FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseResources'.
[stderr] > java.util.concur rent.ExecutionException:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource
compilation failed
[stderr] /app/turtle/workingdir/android/sdk33/android-shell-
app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: error: failed to read PNG
signature: file does not start with PNG signature.
[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 43s
`
I was facing this issue too, and I resolved it by using "expo-cli build:android -t apk" instead of "exp build:android". This built the apk without any errors and all the images rendered perfectly.
Make sure you have expo-cli installed.