I am trying to create an APK from react native expo application but upon doing the command to generate the apk (eas build), I run into the following error :
[stderr]FAILURE: Build failed with an exception.
[stderr][stderr]
- What went wrong:
Execution failed for task ‘:expo-splash-screen:compileReleaseKotlin’.
[stderr][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]
- Get more help at https://help.gradle.org
BUILD FAILED in 6m 32s
Error: Gradle build failed with unknown error. See logs for the "Run
gradlew" phase for more information.
I thought the error could be from splash in the app.json file but I can’t see what’s wrong in it.
{
"expo": {
"name": "Talky",
"slug": "talky",
"scheme": "com.bertdelaspeed.talky",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/Talky_logo.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/Talky_splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
}
}
}
2
Answers
The solution I figured out is to first do:
That should generate an android directory then you can do
You should find it in 3 places: package.json, package-lock.json and node_modules
This can be fixed with out expo prebuild, by just upgrading to latest expo version or expo@~49.0.6
Source