1

so recently, I created my first project in react native, but when I want to run it on my android emulator, it returns me this error :

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Wood'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file C:\Users\thegl\.gradle\caches\jars-9\58f2ec2094ef71854a105c273af3dbce\protobuf-java-3.10.0.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 1s

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 'Wood'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file C:\Users\thegl\.gradle\caches\jars-9\58f2ec2094ef71854a105c273af3dbce\protobuf-java-3.10.0.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 1s

    at makeError (C:\Users\thegl\Desktop\Wood\Wood\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
    at C:\Users\thegl\Desktop\Wood\Wood\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runOnAllDevices (C:\Users\thegl\Desktop\Wood\Wood\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (C:\Users\thegl\Desktop\Wood\Wood\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.

also, it create me a file name protobuf-java3.10.0.jar.lock.lock in this folder : C:\Users\thegl.gradle\caches\jars-9\58f2ec2094ef71854a105c273af3dbce

I don't know what to do to resolve this error, I searched on all the internet, please help me

  • Does this answer your question? [Android Build Failure: Common Issue- Failed to install the app. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081](https://stackoverflow.com/questions/74334162/android-build-failure-common-issue-failed-to-install-the-app-error-command-f) – Thanhal P A Nov 06 '22 at 13:06

0 Answers0