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
Related
While building react native app android build, build fails with the below error.
* What went wrong:
Execution failed for task ':app:minifyReleaseWithR8'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/builder/.gradle/caches/transforms-3/9d54c56caf527c039b9b3330018afb36/transformed/jetified-opencv-4.1.0-runtime.jar:org/opencv/android/BaseLoaderCallback$4.class
* 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.9.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2m 40s
859 actionable tasks: 859 executed
And also I could find this in the logs
> Task :app:processReleaseMainManifest
[:#react-native-async-storage] /Users/builder/clone/node_modules/#react-native-async-storage/async-storage/android/build/intermediates/library_manifest/release/AndroidManifest.xml Warning:
Package name 'com.reactnativecommunity.asyncstorage' used in: :#react-native-async-storage, :react-native-async-storage_async-storage.
[com.websitebeaver:opencv:4.1.0] /Users/builder/.gradle/caches/transforms-3/fcf304f50b7eebb3b0e77318cad199c2/transformed/jetified-opencv-4.1.0/AndroidManifest.xml Warning:
Package name 'org.opencv' used in: com.websitebeaver:opencv:4.1.0, :openCVLibrary310.
/Users/builder/clone/android/app/src/main/AndroidManifest.xml:12:9-20:20 Warning:
provider#com.reactnativecommunity.webview.RNCWebViewFileProvider#android:authorities was tagged at AndroidManifest.xml:12 to replace other declarations but no other declaration present
So what can I do to resolve this error?
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
I try to build my expo app on android platform so I had this error while building.
So when I run eas build --platform android this appear in the log:
Specifying "android.package" in app.json is deprecated for bare
workflow projects. EAS Build depends only on the value in the native
code. Please remove the deprecated configuration.
and here is the log of Run gradlew bellow:
[stderr] FAILURE: [stderr] Build failed with an exception. [stderr]
Where: [stderr] Build file '/home/expo/workingdir/build/node_modules/react-native-mqtt/android/build.gradle'
line: 36 [stderr]
What went wrong: [stderr] A problem occurred evaluating project ':react-native-mqtt'. [stderr]
Could not find method compile() for arguments [com.facebook.react:react-native:0.19.+] 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 3m 14s Deprecated Gradle features were used in this build, making it
incompatible with Gradle 8.0. You can use '--warning
Could someone help me to solve this issue please!
So, a couple things.
I'll assume you followed the instructions well enough from the docs to get to this point. The first error shows you what to do in your app.json, which is remove android.package entry.
The second thing is the package you appear to be using. It has not been actively maintained for a while and the numerous issues show it to have a problem which is why you have that gradlew error shown. A better library may be this one linked here. I haven't tested it though so YMMV.
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"
}
```> 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!