Failed to create Jar file C:\Users\Fasih_khan\.gradle\caches\jars-8\d39c566f673fd9079bc7973003ab0a69\builder-4.2.2.jar

Viewed 350

npx react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 982 file(s) to forward-jetify. Using 4 workers... info Starting JS server... info Installing the app...

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'food_shop'.

Failed to create Jar file C:\Users\Fasih_khan.gradle\caches\jars-8\d39c566f673fd9079bc7973003ab0a69\builder-4.2.2.jar.

  • 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 41s

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

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'food_shop'.

Failed to create Jar file C:\Users\Fasih_khan.gradle\caches\jars-8\d39c566f673fd9079bc7973003ab0a69\builder-4.2.2.jar.

  • 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 41s

at makeError (E:\COURSES\Development\Shop\food_shop\node_modules\execa\index.js:174:9)     
at E:\COURSES\Development\Shop\food_shop\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (E:\COURSES\Development\Shop\food_shop\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (E:\COURSES\Development\Shop\food_shop\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:192:9)

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

1 Answers

For me error was like below GradleException: Failed to create Jar file /root/.gradle/caches/jars-8/da1fb602f5e9c4589f7a774fa11d9312/bin.jar

Solution was : touch /root/.gradle/caches/jars-8/da1fb602f5e9c4589f7a774fa11d9312/bin.jar

If it will help.

Related