Expo custom dev client build fail in Run gradlew - android

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

Related

React native create apk problem for Google-mobile-ads package and Gradle

> Task :react-native-google-mobile-ads:generateReleaseRFile FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-google-mobile-ads:generateReleaseRFile'.
> Could not resolve all files for configuration ':react-native-google-mobile-ads:releaseCompileClasspath'.
> Failed to transform react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=release, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0-release.aar
* 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
BUILD FAILED in 3s
13 actionable tasks: 3 executed, 10 up-to-date
ahmetsubasi#Ahmets-MacBook-Air android %
It wasn't there before, maybe something has been updated.I want generate apk in react native. But I am getting an error like this. Maybe Gradle or admob package.
I am using react native when generate apk. (./gradlew assembleRelease)

Ionic pending apk building

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

Could not resolve all files for configuration ':app:androidJdkImage in flutter app

Hello trying debuging app in my real device when i try run code i am getting this error in fluter
Launching lib/main.dart on RMX2020 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':app:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /Users/apple/Library/Android/sdk/platforms/android-31/core-for-system-modules.jar.
> jlink executable /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/jlink does not exist.
* 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 15s
Exception: Gradle task assembleDebug failed with exit code 1

React Native Expo Build failed for task ':app:bundleReleaseJsAndAssets'

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"
}

React Native error Task :app:checkDebugAarMetadata FAILED after install React Drawer Navigation v6

i got my react native app error after i installed react-navigation-drawer. please help
comand: npm run android
> Task :app:checkDebugAarMetadata FAILED
7 actionable tasks: 2 executed, 5 up-to-date
[..................] / : timing config:load:flatten Completed in 3ms
FAILURE: Build failed with an exception.
[..................] / : timing config:load:flatten Completed in 3ms
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform react-native-reanimated-65-jsc.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
> Execution failed for JetifyTransform: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar.
> Transform's input file does not exist: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar. (See https://issuetracker.google.com/issues/158753935)
* 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 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform react-native-reanimated-65-jsc.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
> Execution failed for JetifyTransform: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar.
> Transform's input file does not exist: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar. (See https://issuetracker.google.com/issues/158753935)
* 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 4s
at makeError (/home/risman/drive/android/project/POS/node_modules/#react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
at /home/risman/drive/android/project/POS/node_modules/#react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/home/risman/drive/android/project/POS/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:106:5)
at async Command.handleAction (/home/risman/drive/android/project/POS/node_modules/#react-native-community/cli/build/index.js:186:9)
I followed how to install react-navigation-drawer on the official documentation on installation guide

Categories

Resources