'65 17 I try to run react-native app on android studio emulator on my windows. When I write react-native run-android using windows terminal It get
$ npm run android
[email protected] android react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 936 file(s) to forward-jetify. Using 8 workers... info JS server already running. info Installing the app...
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':react-native-gradle-plugin'.
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Unexpected lock protocol found in lock file. Expected 1, found 0.
- 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
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':react-native-gradle-plugin'.
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Unexpected lock protocol found in lock file. Expected 1, found 0.
- 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 (C:\Users\computer\Desktop\PROJECTS\myfirstproject\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Users\computer\Desktop\PROJECTS\myfirstproject\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 (C:\Users\computer\Desktop\PROJECTS\myfirstproject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\computer\Desktop\PROJECTS\myfirstproject\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
