Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-Native Execution failed for task ':app:packageDebug'

Whenever I try to run 'react-native run-android'

I got failure:

Execution failed for task ':app:packageDebug'

I tried checkout to previus commits. I tried removing android/app/build and re-build I tried removing debug.keystore and initiated it again.

none of them solved the problem.

I successfully run my app before in android virtual device, and I've already uploaded my app to google play store, and it works.

I haven't seen this error before. My code worked totally fine before:

  • I removed some font files in android/src/main/assets/fonts. This maybe the reason.
  • I ran "react-native run-ios". This may be the reason.

Task :app:packageDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings 117 actionable tasks: 5 executed, 112 up-to-date

FAILURE: Build failed with an exception.

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

    4 exceptions were raised by workers: java.io.UncheckedIOException: java.io.IOException: Execution of compression failed. java.io.UncheckedIOException: java.io.IOException: Execution of compression failed. java.io.UncheckedIOException: java.io.IOException: Execution of compression failed. java.io.UncheckedIOException: java.io.IOException: Execution of compression failed.

BUILD FAILED in 22s

at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (/Users/leonkong/Desktop/dev/CoddingHippo/Native_Makkcha/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:74:39)
at buildAndRun (/Users/leonkong/Desktop/dev/CoddingHippo/Native_Makkcha/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
at then.result (/Users/leonkong/Desktop/dev/CoddingHippo/Native_Makkcha/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12)

Build Success message. And running app on virtual device by android studio 2

like image 697
leonkong Avatar asked Aug 31 '25 18:08

leonkong


1 Answers

  • Clean Gradle

    cd android

    ./gradlew clean

like image 66
michael_vons Avatar answered Sep 02 '25 09:09

michael_vons