Execution failed for task ':app:mergeReleaseResources' - react-native

I tried to build my react native app with eas build. First build was failed due to react-native-navbar-color. Then I resolved the issue and tried building again.Again, this is the error I am getting while building the app.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseResources'.
[stderr] > Multiple task action failures occurred:
[stderr] > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
[stderr] > Android resource compilation failed
[stderr] ERROR:/home/expo/workingdir/build/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: AAPT: error: file failed to compile.
[stderr]
[stderr] > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
[stderr] > Android resource compilation failed
[stderr] ERROR:/home/expo/workingdir/build/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: AAPT: error: file failed to compile.
[stderr]
[stderr] > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
[stderr] > Android resource compilation failed
[stderr] ERROR:/home/expo/workingdir/build/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: AAPT: error: file failed to compile.
[stderr]
[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 40s

Related

Execution failed for task ':app:mergeReleaseResources' (When running eas build -p android --profile production)

I'm getting the following error when building the react-native apk app for android via expo build command for production.
Below is the package.json, eas.json and error
package.json ((https://i.stack.imgur.com/3pgm5.png)
eas.json (https://i.stack.imgur.com/tY3YS.png)
ERROR ON EXPO BUILD:
[stderr] Execution failed for task ':app:mergeReleaseResources'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
[stderr] > Android resource compilation failed
[stderr] ERROR:/home/expo/workingdir/build/mobile-app-paywise/android/app/build/generated/res/react/release/drawable-mdpi/assets_images_registration.png: AAPT: error: file failed to compile.
[stderr]
[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 13s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Tried npx expo prebuild, and deleted the drawable* files, but still facing same issues.
Appreciate if anyone could help :(

react-native-activity-recognition :Could not determine the dependencies of task ':react-native-activity-recognition:compileDebugAidl'.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
BUILD FAILED in 30s
at makeError (C:\Users\Windows\Desktop\baonTechInter\userActivityRecognation\node_modules\execa\index.js:174:9)
at C:\Users\Windows\Desktop\baonTechInter\userActivityRecognation\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\Windows\Desktop\baonTechInter\userActivityRecognation\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\Windows\Desktop\baonTechInter\userActivityRecognation\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.

EAS Expo Build issue with Installing Dependencies?

I am trying to use EAS in my managed expo app but running into this issue at the build cmd(eas build).
My app works perfectly fine when doing expo start.
This is the error log I get from eas build. What should I do to fix this problem? I don't understand why it's bascially saying that it can't find my npm folder(at least that appears to be the problem.)
Running npm in the root dir of your repository
[stderr] npm
[stderr] WARN read-shrinkwrap This version of npm is compatible with lockfileVersion#1, but package-lock.json was generated for lockfileVersion#2. I'll try to do my best with it!
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/ReactNative/EXDevLauncherRCTBridge.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/Errors/EXDevLauncherRedBox.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/Unsafe/RCTPackagerConnection+EXDevLauncherPackagerConnectionInterceptor.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/build/DevLauncher.js.map'
[stderr] npm WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/build/DevLauncherErrorManager.js.map'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/build/DevLauncherErrorManager.web.js.map'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/build/setUpErrorHandler.fx.js.map'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/build/setUpErrorHandler.fx.web.js.map'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/build/WebUnsupportedError.js.map'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/android/src/main/java/expo/modules/devmenu/modules/DevMenuSettings.kt'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/android/src/debug/res'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/android/src/main/java/expo/modules/devmenu/tests/DevMenuTestInterceptor.kt'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/android/src'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/ios/Modules'
[stderr] npm WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/ios/Modules'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/ios/DevMenuLoadingView.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/ios/Modules'
[stderr] npm WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/ios/Modules'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/android/src/main/res/drawable-xhdpi'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/ios/DevMenuRCTBridge.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Transitioning/DevMenuREAAllTransitions.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAAlwaysNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREABezierNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREABlockNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREACallFuncNode.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAClockNodes.m'
[stderr] npm WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAConcatNode.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREACondNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREADebugNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAEventNode.m'
[stderr] npm WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAFunctionNode.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src/main/java/com/facebook/react/common/network'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAJSCallNode.m'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/DevMenuREAModule.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/android/src/main/res/drawable-hdpi/dev_launcher_ic_refresh_white_36dp.png'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREANode.m'
[stderr] npm WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/android/src/main/res/drawable-mdpi/dev_launcher_ic_refresh_white_36dp.png'
[stderr] npm WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/DevMenuREANodesManager.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAOperatorNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAParamNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAPropsNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREASetNode.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src/main/java/com/facebook/react/config'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAStyleNode.m'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREATransformNode.m'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Transitioning/DevMenuREATransition.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src/main/java/com/facebook/react/fabric/BUCK'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Transitioning/DevMenuREATransitionAnimation.m'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/assets/bundle/assets/settings-filled-icon.png'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Transitioning/DevMenuREATransitionManager.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Transitioning/DevMenuREATransitionValues.m'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/assets/bundle/assets/user-filled-icon.png'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-reanimated/ios/Nodes/DevMenuREAValueNode.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-gesture-handler/ios/Handlers/DevMenuRNFlingHandler.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-gesture-handler/ios/Handlers/DevMenuRNForceTouchHandler.m'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-gesture-handler/ios/DevMenuRNGestureHandler.m'
[stderr] npm WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/Views'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src'
[stderr] npm WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-gesture-handler/ios/DevMenuRNGestureHandlerButton.m'
[stderr] npm WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-gesture-handler/ios/DevMenuRNGestureHandlerEvents.m'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/ReactNative/EXDevLauncherBundleURLProviderInterceptor.swift'
[stderr] npm
[stderr] WARN tar ENOENT: no such file or directory, lstat '/root/workingdir/build/node_modules/.staging/react-native-b6181b95/ReactAndroid/src'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-gesture-handler/ios/DevMenuRNGestureHandlerManager.m'
[stderr] npm WARN tar
[stderr] ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-launcher-a18e8b31/ios/Errors/EXDevLauncherErrorLogView.swift'
[stderr] npm WARN
[stderr] tar ENOENT: no such file or directory, open '/root/workingdir/build/node_modules/.staging/expo-dev-menu-8a1c2d72/vendored/react-native-gesture-handler/ios/DevMenuRNGestureHandlerModule.m'

React Native error- Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

I am getting following error which was working earlier perfectly but next day it start to throw this error.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
> Problems reading data from Binary store in C:\Users\wsguest\AppData\Local\Temp\gradle8528155178066901693.bin offset 38021 exists? true
* 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 14s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
npm ERR! code 1
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c react-native run-android
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\wsguest\AppData\Local\npm-cache\_logs\2021-05-18T00_30_03_793Z-debug.log
Any suggestion what could be reason for error?

i can not understand what wrong with my react native app ///

info Installing the app...
Task :app:stripDebugDebugSymbols FAILED
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.2/userguide/command_line_interface.html#sec:command_line_warnings
25 actionable tasks: 2 executed, 23 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
Unable to delete directory 'C:\Users\ANTOR ROY\Desktop\royapp\android\app\build\intermediates\stripped_native_libs\debug\out\lib' after 10 attempts
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 39s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
npm ERR! code 1
npm ERR! path C:\Users\ANTOR ROY\Desktop\royapp
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c react-native run-android
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ANTOR ROY\AppData\Local\npm-cache_logs\2021-03-02T09_18_41_856Z-debug.log