Execution failed for task ':app:mergeDebugNativeLibs'. ... starting run-android failing last 3 days with no solution to it

Viewed 1325

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 870 file(s) to forward-jetify. Using 8 workers... info JS server already running.

  • daemon not running; starting now at tcp:5037
  • daemon started successfully info Installing the app... Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details

Task :app:compileDebugJavaWithJavac

Task :app:mergeDebugNativeLibs FAILED 28 actionable tasks: 5 executed, 23 up-to-date Note: D:\working-projects\TestProject\android\app\src\debug\java\com\testproject\ReactNativeFlipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

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.MergeJavaResWorkAction java.io.IOException: Data error (cyclic redundancy check)

  • 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 1m 25s

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.bat app:installDebug -PreactNativeDevServerPort=8081 Note: D:\working-projects\TestProject\android\app\src\debug\java\com\testproject\ReactNativeFlipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

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.MergeJavaResWorkAction java.io.IOException: Data error (cyclic redundancy check)

  • 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 1m 25s

at makeError (D:\working-projects\TestProject\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at D:\working-projects\TestProject\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 (D:\working-projects\TestProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\working-projects\TestProject\node_modules\@react-native-community\cli\build\index.js:192:9)

info Run CLI with --verbose flag for more details.

Have been facing this issue all of a sudden I have reinstalled the whole setup again for react native but still getting this same error. Getting no clues as to what is the exact issue.. All help appreciated..

1 Answers

I finally managed to get it working ... the issue was of bad sectors on HDD ... just ran chkdsk /f/r and everything started to work fine after its completion

Related