admin管理员组文章数量:1307415
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?
本文标签:
版权声明:本文标题:Gradle Build Fails in Expo React Native: "Unexpected lock protocol found in lock file. Expected 3, found 50" - 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741829007a2399820.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论