I have an error when I try building my react native project with eas, but it works with expo.
Error: The resource `/home/expo/workingdir/build/index.js` was not found.
at /home/expo/workingdir/build/node_modules/metro/src/IncrementalBundler.js:457:26
at gotStat (node:fs:2637:21)
at FSReqCallback.oncomplete (node:fs:198:21)
info Run CLI with --verbose flag for more details.
> Task :app:bundleReleaseJsAndAssets FAILED
[stderr] error The resource `/home/expo/workingdir/build/index.js` was not found.
[stderr] FAILURE: Build failed with an exception.
[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. 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 50s
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
34 actionable tasks: 34 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
You should check you package.json and rename index.js to your entry file.
},
"main": "index.js"
}
Related
I am trying to build a custom development client but I am getting an error in Run gradlew same thing with npx expo run:android the build fail I tried a lot of solution I found on the internet but nothing work so I hope I can find the answer here
this is the login terminal:
🤖 Android build failed:
Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
this is the full error log:eas build --profile development --platform android
> Task :app:dexBuilderDebug
> Task :app:mergeDebugJavaResource
> Task :expo-modules-core:prepareBoost
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
540 actionable tasks: 540 executed
[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:mergeLibDexDebug'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
[stderr] > There was a failure while executing work items
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
[stderr] > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
[stderr] Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
[stderr] Type com.bumptech.glide.GeneratedAppGlideModuleImpl is defined multiple times: /home/expo/workingdir/build/node_modules/react-native-fast-image/android/build/.transforms/8485071c78dff0abed4a3b931866670b/transformed/classes/classes.dex, /home/expo/workingdir/build/node_modules/expo-image/android/build/.transforms/e9cf1b24da03614611457bfd0fa1835b/transformed/classes/classes.dex
[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 5m 57s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
also this is the error for npx expo run:android
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeLibDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Type com.bumptech.glide.GeneratedAppGlideModuleImpl is defined multiple times: E:\WorkSpace\Projects\React Native\elazan\node_modules\react-native-fast-image\android\build\.transforms\61a2dc3987f9871d3192ff0231abdd0e\transformed\classes\classes.dex, E:\WorkSpace\Projects\React Native\elazan\node_modules\expo-image\android\build\.transforms\8bd1747da24c2482c4a1d5c764b71a8a\transformed\classes\classes.dex
* Try:
> 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> 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.
==============================================================================
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
BUILD FAILED in 27s
498 actionable tasks: 14 executed, 3 from cache, 481 up-to-date
Error: E:\WorkSpace\Projects\React Native\elazan\android\gradlew.bat exited with non-zero code: 1
Error: E:\WorkSpace\Projects\React Native\elazan\android\gradlew.bat exited with non-zero code: 1
at ChildProcess.completionListener (E:\WorkSpace\Projects\React Native\elazan\node_modules\#expo\spawn-async\build\spawnAsync.js:52:23)
at Object.onceWrapper (node:events:646:26)
at ChildProcess.emit (node:events:526:28)
at ChildProcess.cp.emit (E:\WorkSpace\Projects\React Native\elazan\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
...
at spawnGradleAsync (E:\WorkSpace\Projects\React Native\elazan\node_modules\#expo\cli\build\src\start\platforms\android\gradle.js:72:46)
at Object.assembleAsync (E:\WorkSpace\Projects\React Native\elazan\node_modules\#expo\cli\build\src\start\platforms\android\gradle.js:52:18)
at runAndroidAsync (E:\WorkSpace\Projects\React Native\elazan\node_modules\#expo\cli\build\src\run\android\runAndroidAsync.js:31:24)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
eas version: eas-cli/3.3.2 win32-x64 node-v16.14.2
in case anyone got the same error, i solve it by uninstall expo-image
The project is made with ionic 3, when I try to generate the apk I get this error, I don't know what approach to use to deal with this problem please I need your help. Here is the error I get, I tried several alternatives but no success, the version of graddle is there 7.1
> Task :app:checkReleaseAarMetadata FAILED
> Task :app:bundleReleaseResources FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-28).
Dependency: androidx.appcompat:appcompat-resources:1.6.0-rc01.
AAR metadata file: /home/roosvelt/.gradle/caches/transforms-3/2166b563575881abf26d682bf5e7b40b/transformed/jetified-appcompat-resources-1.6.0-rc01/META-INF/com/android/build/gradle/aar-metadata.properties.
* Try:
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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
> Android resource linking failed
ERROR:/home/roosvelt/.gradle/caches/transforms-3/8e2876a9a5ebb578738285d001baa267/transformed/core-1.9.0/res/values/values.xml:104:5-113:25: AAPT: error: resource android:attr/lStar not found.
* Try:
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.
==============================================================================
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 41s
25 actionable tasks: 25 executed
Command failed with exit code 1: /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/gradlew :app:bundleRelease -b /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/build.gradle
Error: Command failed with exit code 1: /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/gradlew :app:bundleRelease -b /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/build.gradle
at makeError (/home/roosvelt/Documents/Dev/Perso/freevigile-master/node_modules/cordova-android/node_modules/execa/lib/error.js:60:11)
at handlePromise (/home/roosvelt/Documents/Dev/Perso/freevigile-master/node_modules/cordova-android/node_modules/execa/index.js:118:26)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ProjectBuilder.build (/home/roosvelt/Documents/Dev/Perso/freevigile-master/node_modules/cordova-android/lib/builders/ProjectBuilder.js:316:20)
[ERROR] An error occurred while running subprocess cordova.
cordova build android --release --verbose exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 2 functions +0ms
ionic:utils-process processExit: exiting (exit code: 1) +268ms
I am trying to migrate from classical builds to eas but the builds are failing due to some internal reason at Task :expo-crypto:compileReleaseKotlin
This happened with both bare and managed workflows, Expo Cli version : 5.2.0 Expo SDK Version : 44.0.0
P.S. : I dont use expo-crypto in the project, it also is not a part of package.json
Here's the error log.
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (10, 5): Unresolved reference: Name
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (12, 5): Interface Function does not have constructors
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (13, 5): Unresolved reference: AsyncFunction
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
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
333 actionable tasks: 333 executed
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-crypto: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. 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 7m 38s
```> Task :app:mergeDebugNativeLibs FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path 'lib/x86/libnode.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake
Try:
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.
Get more help at https://help.gradle.org
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.5/userguide/command_line_interface.html#sec:command_line_warnings
BU?LD FAILED in 20s
41 actionable tasks: 3 executed, 38 up-to-date
Command failed with exit code 1: C:\Users\Privat\Desktop\FamilienPunkte\fp\platforms\android\gradlew cdvBuildDebug -b C:\Users\Privat\Desktop\FamilienPunkte\fp\platforms\android\build.gradle```
Im using nodejs-mobile-cordova and cordova-plugin-console plugins.
Ty for helping!
I have all the environment variables configured correctly, and I have this error
Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
82 actionable tasks: 3 executed, 79 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Could not read path 'C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\appcompat'.
Try:
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.
Get more help at https://help.gradle.org
BUILD FAILED in 58s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Could not read path 'C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\appcompat'.
Try:
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.
Get more help at https://help.gradle.org
BUILD FAILED in 58s
at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at then.result (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)