4

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

4 Answers 4

4
  • Clean Gradle

    cd android

    ./gradlew clean

Sign up to request clarification or add additional context in comments.

Comments

0

I just restarted my computer and ran ./gradlew assembleRelease again in the project's android folder and it worked.

Comments

0

I also face issue.

I just open Android Studio - Clear Build - Run app.

Works for me

Comments

0

I followed these steps

  1. Uninstall app from emulator
  2. Remove build from android
  3. Run ./gradlew clean in android
  4. Run react-native start --reset-cache
  5. Run react-native run-android

It worked for me

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.