I'm trying to run my React Native project using Expo (npx expo run:android
), but I'm encountering a Gradle error:
FAILURE: Build failed with an exception.
* What went wrong:
Unexpected lock protocol found in lock file. Expected 3, found 50.
* 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 .
What I Tried:
Updated Gradle to 8.10.2 manually by downloading it from the official site and extracting it to:
C:\Users\LENOVO\gradle-8.10.2
Modified
gradle-wrapper.properties
(insideandroid/gradle/wrapper/
) to point to the local Gradle distribution:distributionUrl=file\:///C:/Users/LENOVO/gradle-8.10.2-all.zip
Cleared Gradle Cache:
cd android gradlew clean
Deleted Lock Files:
android/.gradle
android/gradle/wrapper
android/.gradle/gradle.lock
Tried Running Again:
npx expo run:android
System Info:
- OS: Windows 10
- Expo CLI Version:
6.3.10
- React Native Version:
0.76.6
- Gradle Version: 8.10.2
Despite these steps, I'm still getting the "Unexpected lock protocol found in lock file. Expected 3, found 50" error. How can I resolve this issue?