Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Build Failed: mergeDebugJavaResource with VerifyException on MacBook Air M2 #2581

Open
anuchah opened this issue Jan 27, 2025 · 0 comments
Labels
question Further information is requested

Comments

@anuchah
Copy link

anuchah commented Jan 27, 2025

I am encountering an error while trying to build and install my React Native app on a MacBook Air M2. The build fails with the following message:

info A dev server is already running for this project on port 8081.
info Installing the app...

Task :app:mergeDebugJavaResource FAILED
40 actionable tasks: 2 executed, 38 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugJavaResource'.

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
com.google.common.base.VerifyException (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 1s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction > com.google.common.base.VerifyException (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 1s.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment Information:

React Native Version: 0.73
Node Version: v18.20.6
yarn Version: 1.22.22
Operating System: macOS Sonoma (MacBook Air M2)
Gradle Version: 8.3

Ask your Question

  1. What could cause the mergeDebugJavaResource task to fail with a VerifyException?
  2. Are there specific configurations in build.gradle or dependencies that might trigger this error?
  3. Is there a way to debug this issue further?
    Thank you in advance for your assistance! 🙏
@anuchah anuchah added the question Further information is requested label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant